interview questions for experienced sfdc developers
can you please share interview questions and different senarios which ask for experienced sfdc developers
Salesforce Solution Architect interview Questions.
Please provide "Salesforce Solution Architect" interview questions.
Thanks in advance.
Recalling Approval Process
I am trying to execute the following code for recalling an approval process an ends up getting the following error
execution of AfterUpdate caused by: System.DmlException: Process failed. First exception on row 0; first error: INVALID_OPERATION, Illegal transition type:
Approval.ProcessWorkItemRequest pwr = new Approval.ProcessWorkItemRequest();
List<ProcessInstance> procins = new List<ProcessInstance>([select Id from ProcessInstance where Status = 'Pending' and TargetObjectId = :objectId]);
// Retrieve the process work instance id associated to the process instance
List<ProcessInstanceWorkitem> workitem = new List<ProcessInstanceWorkitem>([select Id from ProcessInstanceWorkitem where ProcessInstanceId = :procins.id]);
if ((workitem != null) && (workitem.size() > 0))
// Execute process request
Approval.ProcessResult pr = Approval.process(pwr);