Skip to content

Commit

Permalink
Add update check for Opportunity Name
Browse files Browse the repository at this point in the history
  • Loading branch information
npsp-reedestockton committed Oct 19, 2023
1 parent 34efac3 commit a6e4728
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public with sharing class OPP_OpportunityNamingBTN_CTRL {
if (!thisOpp.isEmpty()) {
OPP_OpportunityNaming.refreshOppNames(thisOpp);
try {
if (!UTIL_Permissions.canUpdate('Opportunity', 'Name')) {
throw new AuraHandledException(System.Label.commonAccessErrorMessage);
}
update thisOpp;
redirect = true;
} catch (Exception ex) {
Expand Down

0 comments on commit a6e4728

Please sign in to comment.