You need to sign in to do that
Don't have an account?
sfdc2705
I want to write a validation rule to achieve this.
Opportunity owner is a Salesforce user and that Salesforce user must have an 'Super User - xxx' user profile on their user record.
Please help me with the code to achieve this.
Thx
Can you please be a bit more clear on the requirement and let me know what exactly needs to be achieved.
Regards,
APKV
you may use $User.ProfileId in your validation rule to check whether particular profile is editing opportunity or not.
Effective with the Summer '13 release, you should be able to write a validation rule like this:
However, this will use two of your cross-object references (out of the limit of 10), so if you are dealing only with one profile and you don't have to worry about profile IDs changing between sandbox and production, you might want to use Owner.ProfileId instead:
This still requires one cross-object referenct to Owner but ProfileId doesn't require one.
If the profile name is actually variable (say you have multiple profiles that start with "Super User" but the "xxx" part changes), you could do something like this instead:
In this case you need to use Owner.Profile.Name because you need to actually parse the text in the profile name.
Shale, that's very cool :)
Thank you, Marko! I try :-)