Показать сообщение отдельно
Старый 19.06.2019, 23:16   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
Bug: Enabling form control overrides data source field allowEdit
Источник: http://alexvoy.blogspot.com/2019/06/...overrides.html
==============

Say, we need to make some field in a form non-editable. As suggested we do it at the form data source level instead of a form control: it guarantees that any form personalization will still have it.

However, if its related form control is enabled by code, the latter overrides your effort.

Take as an example General Ledger journal.

We made Exchange rate disabled.


LedgerJournalTrans_ds.object(fieldNum(LedgerJournalTrans, ExchRate)).allowEdit(_enable);
LedgerJournalTrans_ds.object(fieldNum(LedgerJournalTrans, ExchRate)).enabled(_enable);


And check whether it works in ds.active() method.




However, the standard class makes its related control editable.


Bad surprise as to me. Is it a bug?


Источник: http://alexvoy.blogspot.com/2019/06/...overrides.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.