0

Is it possible to do something like:

Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
req.setComments(quoteObj.Sales_Rep_Comments_for_Approval__c);
req.setObjectId(quoteObj.id);
req.setProcessDefinitionNameOrId(Label.QuoteApprovalProcess);                 
Approval.ProcessResult result = Approval.process(req);
quoteObj.Approval_ID__c = result.id;
update quoteObj;

The goal is to populate a text field with just the id from an approval request, but I am having a hard time getting the id from the request object

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.