Loading

Advanced Approvals creates duplicate Approvals upon double click of Submit Approval Button

Data pubblicazione: Dec 9, 2025
Descrizione
Duplicate approval records may be created after clicking the Submit Approval button. This can occur in Salesforce Classic UI because the Submit Approval button does not become disabled upon initial submission, allowing the user to click the button multiple times generating multiple approval records. In Lightning UI, the page refreshes after users click the Submit Approval button and prevents users from clicking button multiple times.

To restrict the button from being clickable multiple times, the Submit Approval button can be made into a ‘On Click Javascript’ button (Note: this is only supported in Classic; continue using a Visualforce Page button in Lightning).
Risoluzione

Follow these steps to update the Submit button for each object: (NOTE: Existing customers must update their "Submit for Approval" button in order for this change to take effect)

  1. Navigate to: Setup | Create | Objects | Quote* | Buttons | Submit for Approval |
    1. If you are using Lightning, navigate to: Setup | Create | Objects | Quote* | Buttons, Links & Actions | Submit for Approval
* Indicates the object you have created the approval button
  1. Change Behavior to Execute JavaScript -
  2. Content Source OnClick JavaScript
    1. Paste following into detail box: 
​​​​​
var btn = document.getElementsByName("submit_for_approval")[0];
btn.disabled = true; 
btn.className = 'btnDisabled'; 
window.location='./apex/SubmitQuote?Id={!SBQQ__Quote__c.Id}'; 

 

Note: "submit_for_approval", all in lower case, is a placeholder for the organization’s button name. This needs to be lower case due to the JavaScript API case-sensitivity with getElementsByName() method.


The new button's settings will prevent multiple Approval records from being created when the Submit for Approval button is pressed repeatedly.

Risorse aggiuntive
SEE ALSO
Numero articolo Knowledge

000384431

 
Caricamento
Salesforce Help | Article