Is there a way to make field validation use custom logic? For example, instead of something simple like requiring any numeric value, it might check the value in another table, check for a specific value, etc.
Is there a way to make field validation use custom logic? For example, instead of something simple like requiring any numeric value, it might check the value in another table, check for a specific value, etc.
For that , it can only use an expression for the ShowMandatory property, the property cannot validate a C/AL function. So in this case you cannot put logic to check value from other table.
detail :
docs.microsoft.com/.../showmandatory-property
alternatively is use the method i mentioned and pop up Error Message Box .
I mean more on a custom page field I have, For example:
Is it possible to use logic here, test the inputted value, and return true/false? Returning false would display the red X with the reason why it's not valid.
You can use event subscriber by subscribing to the field you want to validate.
sample below will do validation on Location Code field at Sales Line table
André Arnaud de Cal...
293,001
Super User 2025 Season 1
Martin Dráb
231,833
Most Valuable Professional
nmaenpaa
101,156
Moderator