20.04.2012, 23:13 | #1 |
Участник
|
emeadaxsupport: Override AllowEditOnCreate when creating records through a service
Источник: http://blogs.msdn.com/b/axsupport/ar...a-service.aspx
============== I had a case recently in which they were creating records using the DocuRefService. The problem was that an error occurred stating "Field must be filled in", even though the field mentioned had been specified in the code. The error occurred on these fields... RefCompanyId RefRecId RefTableId As it turned out, all had a Mandatory property of Yes and had AllowEditOnCreate = No. This could be worked around by changing the AllowEditOnCreate property to Yes for these fields but could have an impact on application functionality. Instead, override the initFieldAccessOverrides method in AxdDocuRef protected void initFieldAccessOverrides() { this.overRideFieldAccess(tableNum(DocuRef), fieldNum(DocuRef, RefRecId), AxdFieldAccess::AllowEditOnCreate, NoYes::Yes); this.overRideFieldAccess(tableNum(DocuRef), fieldNum(DocuRef, RefTableId), AxdFieldAccess::AllowEditOnCreate, NoYes::Yes); this.overRideFieldAccess(tableNum(DocuRef), fieldNum(DocuRef, RefCompanyId), AxdFieldAccess::AllowEditOnCreate, NoYes::Yes); } This way you are only changing the AllowEditOnCreate property while creating records through the service and not impacting other parts of the application. Источник: http://blogs.msdn.com/b/axsupport/ar...a-service.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|