Use Apex Code to Dynamically Select the Approver in a Salesforce Approval Process

Поделиться
HTML-код
  • Опубликовано: 10 дек 2024

Комментарии • 8

  • @obsdig
    @obsdig 3 года назад

    What if want to approve automatically from the apex and approver needs to be a specific user ?

  • @chandusekhar7537
    @chandusekhar7537 5 лет назад

    Thanks for sharing the dynamic approval process, however I'm trying to implement the same on quote based on the status but came across this error "quoteTrggr: execution of BeforeUpdate caused by: System.DmlException: Update failed. First exception on row 0 with id 0054P0000098zhlQAA; first error: CIRCULAR_DEPENDENCY, attempt to violate hierarchy constraints: [spl_approver__c] Class.quoteApproval.SetApprover: line 47, column 1 Trigger.quoteTrggr: line 4, column 1"
    Currently we have all the users as system admins and we have not set up any roles, and we are using the hierarchy field to update the user, in debug I'm also getting user Id but I'm getting above error.
    As per my understanding it is because we have not setup roles the error is coming or any suggestions could help me on this.
    Thanks codebycody

    • @NMStocktalk
      @NMStocktalk 5 лет назад

      even i am also getting same error could you please help me with it ?

  • @sridb1718
    @sridb1718 4 года назад

    Good Work Cody. Quick one, How can we avoid the hardcoded users in Apex code (getApprover). Can we use list custom setting to get the approvers? any better idea?

  • @CodebycodyTutorials
    @CodebycodyTutorials  8 лет назад

    Sorry, there are a few Audio quality issues here. Still learning how to be an "audio engineer" :)

  • @sangeethaa4598
    @sangeethaa4598 7 лет назад

    nice one...

  • @iamcj8290
    @iamcj8290 8 лет назад +1

    liked it...