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
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?
What if want to approve automatically from the apex and approver needs to be a specific user ?
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
even i am also getting same error could you please help me with it ?
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?
Sorry, there are a few Audio quality issues here. Still learning how to be an "audio engineer" :)
nice one...
liked it...
+chetan joshi Thanks!