You need to sign in to do that
Don't have an account?

Approval from trigger - final actions to executed
Hi All,
Thanks for looking at this issue.
I am approving opportunities from a trigger as:
Approval.ProcessWorkitemRequest req = new Approval.ProcessWorkitemRequest();
req.setComments('Approving request using Trigger');
req.setAction('Approve');
ProcessInstanceWorkitem workItem = [Select p.Id from ProcessInstanceWorkitem p where p.ProcessInstance.TargetObjectId =: opp.Id];
Id workItemId = workItem.Id;
req.setWorkitemId(workItemId);
Approval.ProcessResult result1 = Approval.process(req);
I have some final approval actions set on opportunity approval process.
But these actions are not executed whe opportunities are approved from triger.
Any thoughts?
Thanks,
Bakul
tks,
When I did the deploy from snadbox to production, my language in sandbox was Portuguese and in production was English this caused a problem in the approval process.