Источник:
https://dynamicsaxinsight.com/2024/0...a-form-in-xpp/
==============
Purpose:
The purpose of this post is to explain how can we make a standard field mandatory on a form in X++.
Application:
Dynamics 365 for Finance and Operations
Business requirement:
Business requirement is to make a field mandatory which is an optional field in Standard Dynamics.
Solution:
We are extending the PurchCreateOrder form in the code below and using chain-of-command, we’re extending the init method and making the Buyer group field mandatory on the form datasource.
Code
[ExtensionOf(formStr(PurchCreateOrder))]internal final class ATLAS_PurchCreateOrder_Form_Extension{ /// /// Make a field mandatory. /// /// /// Atlas Dynamics Pty Ltd. /// void init() { next init(); purchTable_DS.object(fieldNum(PurchTable, ItemBuyerGroupId)).mandatory(true); }}
Источник:
https://dynamicsaxinsight.com/2024/0...a-form-in-xpp/