![]() |
#1 |
Участник
|
SysOperationAutomaticUIBuilder (SysOperationUIBuilder) amd Nested Data Contracts
Источник: http://alexvoy.blogspot.com/2016/07/...uibuilder.html
============== <div dir="ltr" style="text-align: left;" trbidi="on">Shame on me, but this the only way I found to get access to form controls exposing from a nested data contract. Say, we have a data contract (blue) with a nested data contract (orange). Both will be exposed to the dialog; however, we can have access via binding info to the main contract parameters only. For example, we can change some properties for these fields in postBuild() method of its SysOperationAutomaticUIBuilder (SysOperationUIBuilder) class like follows. public void postBuild() { DialogField dialogField; SysOperationUIBindInfo bindInfoLoc = this.bindInfo(); super(); contract = this.dataContractObject(); dialogField = bindInfoLoc.getDialogField(contract, methodStr(****CheckPostContract, parmJournalId)); dialogField.allowEdit(false); } However, we cannot do the same way for parameters from the nested data contract. To attain this goal we can, however, iterate all the form build controls to find the one we need to change. In my example, I used the label of the exposed Currency EDT. private void setCurrencyCodeFieldMandatory(FormBuildGroupControl _nestedContractGroup //nestedContractGroup){ FormBuildStringControl currencyFormBuildStringControl; int i; Object childControl; for (i = 1; i
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|