function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hi
I want to write a trigger for giving permissions only to 2 users based on the record type and channel in account , Please guide me how to do this.
Thanks
A better approach would be to allow access to the record type and building a seperate page layout instead of writing a trigger.
You can find current user id userinfo.getUserId() . Now you can check any criteria that this user fullfill or not.
For example:
trigger LeadTrigger on Lead (after insert, after update) {
ID id = userinfo.getUserId()
USER u = [Select id,name from User where id=:id];
if(u.name==''Desired USer'){
// Write trigger code.
}
Hi,
I think you are talking about giving access to couple of users using sharing access records. If yes, let me know, I can help you on this.
Regards,
Digamber Prasad
A better approach would be to allow access to the record type and building a seperate page layout instead of writing a trigger.
You can find current user id userinfo.getUserId() . Now you can check any criteria that this user fullfill or not.
For example:
trigger LeadTrigger on Lead (after insert, after update) {
ID id = userinfo.getUserId()
USER u = [Select id,name from User where id=:id];
if(u.name==''Desired USer'){
// Write trigger code.
}
}
Hi,
I think you are talking about giving access to couple of users using sharing access records. If yes, let me know, I can help you on this.
Regards,
Digamber Prasad