You need to sign in to do that
Don't have an account?
Creatobug
How can I identify the record for which the approval process failed
Approval.ProcessResult is supposed to have fields which identify which record is being processed (getEntityId()). However, this seems to be null for the records for which the approval process fails. Is this the expected behaviour?
Sample Code:
Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
req.setComments('Approval Comments');
req.setObjectId(<Record ID>);
LApproval.ProcessResult result = Approval.process(req, false);
System.debug(result);
So how can we identify those records for which the approval process fails?
Sample Code:
Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
req.setComments('Approval Comments');
req.setObjectId(<Record ID>);
LApproval.ProcessResult result = Approval.process(req, false);
System.debug(result);
So how can we identify those records for which the approval process fails?
The requests and results will be in the same order and the id will be recorded in the requests.