Activity Forums Salesforce® Discussions Automate the approval process?

  • Automate the approval process?

    Posted by Shubham on March 30, 2016 at 2:47 pm

    I have created approval process on opportunity with the entry criteria : Fire Custom ApprovalEQUALSTrue where 'Fire Custom Approval' is custom field of type checkbox.

    Also I have a workflow rule on opportunity product with rule criteria : ListPrice UnitPrice
    and in Immediate Workflow Actions i have updated the 'Fire Custom Approval' checkbox to true of opportunity.

    So when I add a product from opportunity page ,if ListPrice not equal to UnitPrice , my workflow is fired and it is updating the 'Fire Custom Approval' check-box to true but the approval process i have created is not firing automatically. I have to manually click 'Submit for Approval' button.

    I want is to automate the approval process as soon as the entry criteria for the approval is true. can somebody suggest me how to achieve that?

    shariq replied 5 years, 7 months ago 5 Members · 4 Replies
  • 4 Replies
  • Gaurav

    Member
    March 31, 2016 at 6:57 am

    Hi Shubham

    you can Automate the approval prcoess with the help of process builder. Just do is create a New process on Opportunity in the process builder with the entry criteria 'Fire Custom Apprvoal' checkbox true and in the Immediate Actions create new 'Submit for Approval' Action.

    • This reply was modified 8 years, 1 month ago by  Gaurav.
  • Satya

    Member
    April 1, 2016 at 8:48 am

    you can Automate the approval process by using this piece of code in your opportunity trigger:-

    if(oldMap.get(oppObj.Id).Fire_Custom_Approval__c == false && oppObj.Fire_Custom_Approval__c == true){
    Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
    req1.setComments('Submitting request for approval!');
    req1.setObjectId(oppObj.Id);
    Approval.ProcessResult result = Approval.process(req1);
    }

  • Parul

    Member
    September 17, 2018 at 6:23 pm

    Hi,

    You can Automate the approval process with the help of process builder. Create New process on Opportunity in the process builder with the entry criteria ‘Fire Custom Apprvoal’ checkbox true and in the Immediate Actions create new ‘Submit for Approval’ Action.

     

    Thanks

  • shariq

    Member
    September 17, 2018 at 6:37 pm

    Hi,

    To add more about Process builder -

    Using Lightning Process builder you can make the record automatically submit to the approval process whenever it meets the criteria.

    • Go to setup->Create->Workflow & Approval->Process builder
    • Then select the object to which you want to perform the auto-approval submission
    • Enter the criteria for the record
    • In the set Action select 'Submit for Approval'

    Hope this helps.

Log In to reply.

Popular Salesforce Blogs