|
02.11.2018, 14:11 | #1 |
Участник
|
d365technext: Form Data Source Field Method Override D365FO
Источник: http://d365technext.blogspot.com/201...-override.html
============== Form Data Source Field Method Override D365FO In this demo I will show to create extension class of form data source Field class and override method thorough COC. Here is the annotation code to create COC [ExtensionOf(formDataFieldStr(FormName, DataSourceName,DataFieldName))] In this demo we are using HcmWorker form and creating Extension of DirPerson Data source field Personal Title.. [ExtensionOf(formDataFieldStr(HcmWorker, DirPerson,PersonalTitle))] In actual code you can find the method in Hcmworker form [DataField] class PersonalTitle { publicCommon lookupReference(FormReferenceControl_formReferenceControl) { returnDirUtility::buildAffixReferenceControlLookup(_formReferenceControl, DirNameAffixType::PersonalPrefix); } } Here is the code through this we create extension. [ExtensionOf(formDataFieldStr(HcmWorker, DirPerson,PersonalTitle))] finalclassDemo_Extension { } Here is the code through this we override the method. [ExtensionOf(formDataFieldStr(HcmWorker, DirPerson,PersonalTitle))] finalclassDemo_Extension { publicCommon lookupReference(FormReferenceControl_formReferenceControl) { next lookupReference(_formReferenceControl); returnDirUtility::buildAffixReferenceControlLookup(_formReferenceControl, DirNameAffixType::PersonalPrefix); } } Now perform build in sync on your module. enjoy Источник: http://d365technext.blogspot.com/201...-override.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|