Announcements
No record found.
Hello Experts,
I need to make SalesPoolId field of a SalesTable mandatory.
I created a table extension and tried to overwrite ValidateWrite method of the table but I cannot save SalesTable.xpp file.
How can I accomplish this?
Hi,
in D365 you can't overwrite methods. You can write event handlers or use Chain of Command to hook your extension code to standard methods. If you type those things to web search you should find documentation, examples, blogs and discussions.
Hi Priyank,
In addition to the reply from Nikolaos:
Is the requirement to have the sales pool always mandatory (for all legal entities)? In that case, you can create a table extension and change the Mandatory property instead of using x++ coding.
You should consider making the field mandatory through a table extension if that is all you are after. It's a property on the field.
Make a table extension, find the salespoolid field and mark as mandatory.
Just make sure this is what you want - as any logic using the table make require this now.
Optionally, although technically not considered good practice, you can make the field mandatory just on the sales details FORM. You can do a form extension to accomplish that. That would be similar to a personalization, but then for all users. Which sounds more like what you are after?
Hi Andre and Joris,
As per your suggestion I tried to make it mandatory using table extension but mandatory property is disabled so I can't change it.
I may need to do it on the form.
you can try the below code in OnActivated/ initialised form method
datesource_ds.object(fieldNum(datesource, Fieldname)).mandatory(true);
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Giorgio Bonacorsi 649
André Arnaud de Cal... 447 Super User 2026 Season 1
Syed Haris Shah 242 Super User 2026 Season 1