function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
James Roberts 32James Roberts 32 

Process not firing with Visualforce Button Save

I have added a Table with a Save button to my record page using VisualForce. I have a Process in Process Builder that is set to fire whenever the record is created or edited. I have noticed that when I make changes to the table and click the Save button, the Process is not fired. I have to click the button a second time (not making a change) for the Process to fire. 

Here is an extract from the Visualforce page showing the button set up:

<apex:page standardController="Opportunity_Pricing__c" extensions="PricingTable" lightningStylesheets="true">
    <apex:slds />
    <apex:form >
       <apex:pageBlock >
           <apex:pageBlockButtons location="bottom" >
               <apex:commandButton value="Save" action="{!save}" oncomplete="ReloadPage();" />
        </apex:pageBlockButtons>

    function ReloadPage(){
           //alert('reload');
           var urlId = '{!$CurrentPage.parameters.Id}';
           //alert(urlId);
           window.top.location='/'+urlId;
           return false;
       }
ShirishaShirisha (Salesforce Developers) 
Hi James,

Greetings!

Have you tried by refreshing the record page once you have clicked on the VF button and saved the changes on record to see,if it is invoking the procees builder or not.

If not,I would suggest you to try this without clicking on the button again to test.Also,please capture the debug logs while clicking on the button and see,if the process is firing or not.

Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.

Warm Regards,
Shirisha Pathuri