New answers tagged

0

The actual reason is you are trying to process a single record through an approval process multiple times. This happens when you have two different approvers at a single stage. For Example, You have an approval process that has approver A and approver B at step 2. Now you require to reject or approve the approval process through APEX, so you run a loop over ...


0

You should use After Update , here's the sample code List<Approval.ProcessWorkitemRequest> processRequestList = new List<Approval.ProcessWorkitemRequest>(); for(ProcessInstanceWorkItem pIWorkItem : processInstanceWorkItemList){ Approval.ProcessWorkitemRequest workItemRequest = new Approval.ProcessWorkitemRequest(); workItemRequest.setAction('...


0

As per the error what I think is that, the one who is the approver, his/her profile does not have the correct license. Once try giving the approver the System Admin license and see if it works. If it does then positively you need to look into the licenses else the problem is somewhere else. Hope my suggestion was useful.


1

You can add an additional condition to the validation rule to give system administrators the ability to edit the record: AND( $User.Alias != Contact__r.Alias__c, $Profile.Name != 'System Administrator' )


Top 50 recent answers are included