PowerPoint Presentation · Published Table method Preceding event Succeeding event validateWrite...
Transcript of PowerPoint Presentation · Published Table method Preceding event Succeeding event validateWrite...
Eliminate overlayering Support continuous updateImprove implementation /
update speed and quality
App Suite
Hard seal
Hard seal (Nov 2016)
Soft seal (Spring release 2017)
Soft seal(Fall release 2017)
Hard seal (Nov 2016)
Hard seal
Hard seal (Nov 2016)
Hard seal (Fall release 2017)
Hard seal(Spring release 2018)
Extension based customizations only!
Hard seal (Nov 2016)
• Form events
• DataSource events
• Control events
• Form events
• DataSource events
• Control events
• Chain of Command
• Wrap methods
• Add pre/post logic
• New capabilities in PU20
Published Table method Preceding event Succeeding event
validateWrite ValidatingWrite ValidatedWrite
validateDelete ValidatingDelete ValidatedDelete
validateField ValidatingField ValidatedField
validateFieldValue ValidatingFieldValue ValidatedFieldValue
modifiedField ModifyingField ModifiedField
modifiedFieldValue ModifyingFieldValue ModifiedFieldValue
Insert Inserting Inserted
Update Updating Updated
Delete Deleting Deleted
Initvalue InitializingRecord InitializedRecord
DefaultField DefaultingField DefaultedField
DefaultRow DefaultingRow DefaultedRow
Decimals
8.1 Decimal Extensibility EDTs:
• AmountQty
• AssetDepreciationAmountUnit
• AssetDepreciationAmountUnitReportingCurrency
• BOMProductQuantity
• CostAmountNonMonetary
• CostPriceNonMonetary
• CostQuantity
• InventTestLowerLimit
• InventTestLowerTolerance
• InventTestStandardValue
• InventTestUpperLimit
• InventTestUpperTolerance
• MarkupValue
• MCRRoyaltyValue
• PdsRebateValue
• PmfCostAllocationPct
• PriceDiscAmount
• PriceQty
• PriceUnit
• ProductQuantityHourValue
• smmAmountMSTSalesTarget
• TAMRebateValue
https://docs.microsoft.com/en-us/dynamics365/unified-
operations/dev-itpro/extensibility/customization-
overlayering-extensions
[FormEventHandler(formStr(FMRental), FormEventType::PostRun)]public static void FMRental_OnPostRun(xFormRun sender, FormEventArgs e){
sender.design().controlName(formControlStr(FMRental, CopyOfFMRental_StartDate1)).setFocus();}
[ExtensionOf(formStr(FMRental))]final class FMRentalDMO_Extension{
protected FormDateTimeControl getStartDateControl(){
return CopyOfFMRental_StartDate1;}
[FormEventHandler(formStr(FMRental), FormEventType::PostRun)]public static void FMRental_OnPostRun(xFormRun sender, FormEventArgs e){
FormRun formRun = sender;formRun.getStartDateControl().setFocus();
}}
[FormControlEventHandler(formControlStr(FMRental, btnValidate), FormControlEventType::Clicked)]public static void btnValidate_OnClicked(FormControl sender, FormControlEventArgs e){
FormDataSource FMRental_DS = sender.formRun().dataSource(formDataSourceStr(FMRental,FMRental));FMRental rental = FMRental_DS.cursor();
info(int2Str(rental.EndMileage));}
[ExtensionOf(classStr(FMTotalsEngine))]
final class FMTotalsEngineDemo_Extension
{
public NoYes customerInLoyaltyProgram(FMRental _rental)
{
FMCustomer customer;
NoYes returnValue = NoYes::No;
select customer where customer.RecId == _rental.Customer;
if(customer)
{
returnValue = customer.LoyaltyProgram;
}
return returnValue;
}
}
[ExtensionOf(classStr(FMTotalsEngine))]
final class FMTotalsEngineDemo_Extension
{
public NoYes customerInLoyaltyProgram(FMRental _rental)
{
FMCustomer customer;
NoYes returnValue = NoYes::No;
select customer where customer.RecId == _rental.Customer;
if(customer)
{
returnValue = customer.LoyaltyProgram;
}
return returnValue;
}
}
[ExtensionOf(classStr(FMTotalsEngine))]final class FMTotalsEngineDemo_Extension{
private int CustomTotals;
public int calculateCustomTotals(){
CustomTotals = this.chargesTotals() * this.RentalRate();
return CustomTotals;}
}
[ExtensionOf(classStr(FMTotalsEngine))]final class FMTotalsEngineDemo_Extension{
private int CustomTotals;
public int calculateCustomTotals(){
CustomTotals = this.chargesTotals() * this.RentalRate();
return CustomTotals;}
}
class SalesPackingSlipJournalPost extends FormletterJournalPost{
SalesParmTable salesParmTable;SalesParmLine salesParmLine;
CustPackingSlipVersion previousCustPackingSlipVersion;CustPackingSlipTransHistory previousCustPackingSlipTransHistory;
CustPackingSlipVersion custPackingSlipVersion;CustPackingSlipJour custPackingSlipJour;CustPackingSlipTrans custPackingSlipTrans;SalesLine salesLine;SalesTable salesTable;
[ExtensionOf(classStr(SalesPackingSlipJournalPost))]final class SalesPackingSlipJournalPostDMO_Extension{
public boolean checkSalesLine(){
boolean retValue = this.salesLine.checkActivity();
return retValue;}
}
[ExtensionOf(classStr(ReqCalc))]final class ReqCalcDMO_Extension{
protected ReqTrans initTransFromInventSum(ReqTrans _reqTrans,ReqSetup _setup,ReqSetupDim _setupDim,InventSum _inventSum)
{_reqTrans = next initTransFromInventSum(_reqTrans, _setup, _setupDim, _inventSum);
_reqTrans.qty = _reqTrans.qty >= 0 ? _reqTrans.qty : 0;
return _reqTrans;}
}
[ExtensionOf(formStr(InventTransferOrders))]final class InventTransferOrdersDMO_Extension{
public boolean canSubmitToWorkflow(){
boolean returnValue = next canSubmitToWorkflow();
return returnValue;}
}
[ExtensionOf(formDataSourceStr(InventTransferOrders, InventTransferLine))]final class InventTransferOrdersInventTransferLineDS_Extension{
public boolean validateWrite(){
boolean ret = next validateWrite();
//custom logicreturn ret;
}
}
[ExtensionOf(FormDataSourceStr(FormToExtend, DataSource1))]
[ExtensionOf(FormDataFieldStr(FormToExtend, DataSource1, Field1))]
[ExtensionOf(FormControlStr(FormToExtend, Button1))]
[ExtensionOf(formControlStr(InventTransferOrders,MainTab))]final class InventTransferOrdersControlMainTabDMO_Extension{
public boolean tabChange(int _FromTab){
boolean ret = next tabChange(_FromTab);
//Custom logic
return ret;}
}
https://blogs.msdn.microsoft.com/mfp/2018/09/15/tips-for-logging-extensibility-requests/