21.10.2020, 09:13 | #1 |
Участник
|
dynamicsaxinsight: Chain of command example
Источник: https://dynamicsaxinsight.wordpress....mmand-example/
============== Purpose: The purpose of this post is to demonstrate how we can we extend a standard code by using the chain-of-command framework. Product: Dynamics 365 for Finance and Operations Description: The code below extends the saveAttributeValueSet method of DimensionEntryControl class using the chain-of-command framework. Code: [ExtensionOf(classStr(DimensionEntryControl))]final class DimensionEntryControlSXS_Extension{ public DimensionDefault saveAttributeValueSet() { #define.CallerFormName("CustTable") DimensionDefault retCurrentAttrValueSetId; CustTable custTable; retCurrentAttrValueSetId = next saveAttributeValueSet(); if (this.formRun().args().callerName() == #CallerFormName) { FormDataSource dirPartyEntity_ds = this.formRun().dataSource(formDataSourceStr(DirPartyQuickCreateForm,DirPartyEntity)); if (dirPartyEntity_ds) { custTable = dirPartyEntity_ds.cursor(); custTable.DefaultDimension = retCurrentAttrValueSetId; custTable.modifiedField(fieldNum(CustTable, DefaultDimension)); } } return retCurrentAttrValueSetId; }} Источник: https://dynamicsaxinsight.wordpress....mmand-example/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|