ads

Monday 13 August 2018

How to restrict users to update picklist value



trigger AccTrigger on Account (before update) {

    for(Account Acc : trigger.new) {

        if(trigger.oldMap.get(Acc.Id).Industry == 'Electronics') {

            Acc.addError('Industry cannot be updated from Electronics');

        }

    }

}


Output Screen:

No comments:

Post a Comment