2 Users can create new Purchase Order.
How to prevent User A to edit Purchase Order created by User B using AL Code
User A can only view User B's PO.
Did you try any code? what error are you facing?
Hi Yadav,
I don't know what trigger or method should be used to lock editing the page so I have not written the code.
Please use OnBeforeModify trigger
Thanks Yadav,
I will try your suggestion.
Do you know which Action of Edit button ?
I try to set Enabled= false for it.
You can throw error if other user is trying to modify the document as well using ERROR('You are not allowed to modify this document.');
I found a code that lock Edit and Delete:
CurrPage.Editable(false);
Great. Keep learning and Thank you.
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.
OussamaSabbouh 3,377
Jainam M. Kothari 2,696 Super User 2025 Season 2
YUN ZHU 1,512 Super User 2025 Season 2