I need only specific user to update the sales price.In the user setup table i have created a boolean .only the person with that boolean tick can update the sales price.how to write c/al code for this?
thanks
gugan
Thanks Klappspaten. There are 4 users in the user set up and i need only particular users to update the price.In that case how can i give privilege to that users alone
This way you did it.
The code I provided does the following:
1. The OnValidate trigger of the price field is invoked
2. Get the User Setup Record for the user which invoked the trigger
3. Check if the user has the priviledge to change the price
4. The user has no priviledge/flag? Throw an error.
If you need to give other users the priviledge to modify the price, or want to remove the priviledge for a user, activate(deactivate your new boolean field at User Setup for this user.
Answers
Remember to create a local variable of type Record and Subtype 91 (User Setup Table) for this purpose.
There are 4 users in the user set up and i need only particular users to update the price.In that case how can i give privilege to that users alone
The code I provided does the following:
1. The OnValidate trigger of the price field is invoked
2. Get the User Setup Record for the user which invoked the trigger
3. Check if the user has the priviledge to change the price
4. The user has no priviledge/flag? Throw an error.
If you need to give other users the priviledge to modify the price, or want to remove the priviledge for a user, activate(deactivate your new boolean field at User Setup for this user.
See https://forum.mibuso.com/discussion/74318
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!