Notifications
Announcements
No record found.
Dear all,
I would like to know if there are any settings to make item variant code as mandatory when creating new items on item card?
Thanks
*This post is locked for comments
You can set any field as obligatory to be filled using Mandatory for the filling in the User Interface:
msdn.microsoft.com/.../dn757314(v=nav.90).aspx
msdn.microsoft.com/.../dn789528(v=nav.90).aspx
Check also here, how to add small customization apart from Mandatory field (which is not making a validation):
forum.mibuso.com/.../how-to-make-a-field-mandatory-newbie-question
You will be required to do somme sort of customization on any event or action.
Mandatory Field Property as The red asterisk only serves as a reminder that you will be blocked from completing a certain process.
The ShowMandatory property can be used to mark all page fields, but does not enforce any validation of the field. This means that the user will be able to close a page without entering data.
There is not standard functionality to make a record mandatory, please add the following code on the item card in the OnQueryClosePage of the trigger, where ItemVariant is of type record Item Variant table.
OnQueryClosePage(CloseAction : Action None) : Boolean ItemVariant.RESET; ItemVariant.SETRANGE("Item No.","No."); ItemVariant.SETFILTER(Code,'<>%1',''); IF ItemVariant.ISEMPTY THEN ERROR('Please Create Item Variant for the Item %1',"No.");
Hey Kelvin,
Writing code on OnQueryClose Trigger of the Page will be the best approach for these kind of requirements.
This trigger gets fired whenever you close the page so you can write with any combination of what you want and system will check every time you close a page.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.