It is a very challenging requirement, Generally we will update records through trigger for complex requirement. Lets think a scenario where we have to update a particular field value(say field name-IsUpdate) on an Opportunity and few profile is having editable access to that field,there is a already a trigger written for other purpose(updating some other thing) on Opportunity,So we have to modify same trigger and add our logic in that trigger. Our first and foremost approach would be checking profile name in the condition as below. Approach-1(Using profile) Assume that profile "Test_profile_name" is having editable access to that field(IsUpdate) Profile ProfileName = [select Name from profile where id = :userinfo.getProfileId()]; for(Opportunity opp:trigger.new){ if(profileName.Name.containsIgnoreCase('Test_profile_name')){ // opp.IsUpdate = true; } } It will work fine n...
A place where you have to land for exploring Salesforce