Hello Experts
I have made a boolean type field in user setup table.Now my task id if it is checked then that particular user is able to make sales order otherwise is shows an error.
*This post is locked for comments
Why customise it, you can look into the permissions set of that user, until you have given them super role.
Write a code like in Sales Header table:
No. - OnValidate()
usersetup.SETRANGE("User ID", USERID);
IF usersetup.FINDFIRST THEN BEGIN
IF usersetup."task id"<>TRUE THEN BEGIN
usersetup.TESTFIELD("task id",TRUE);
ERROR('You do not have permission to make an Sales Order')
END;
END;
Hope it will resolve your query.
If my answer helps to resolve your issue, please verify it by clicking Yes
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156