Saturday, 20 October 2018

Permission Subscribe to Dashboards: Add Recipients depends on permission(s): Subscribe to Dashboards

I am creating custom standard Admin profile using clone Option, I try to change field access on  custom standard Admin profile I have received the following error.

While saving:

Permission Subscribe to Dashboards: Add Recipients depends on permission(s): Subscribe to Dashboards

workaround:

1) Go to Manage Users --> User Management Settings
2) Disable the Enhanced Profile User Interface setting
3) Go back to the Profile and Save it

Wednesday, 10 October 2018


Trigger to prevent creation of duplicate accounts


trigger AccountDuplicateTrigger on Account (before update) {
//For fetching existing account names
     map<Id,Account> existingAccountMap = new  map<Id,Account>([Select Id, Name, Rating From Account]);
 for(Account a : Trigger.new){
        if(a.name = existingAccountMap.get(a.Id).Name){
          a.adderror('You cannot create a dulplicate account');
        }
     }
}