1

What is the functionality of setProcessDefinitionNameOrId method in ProcessSubmitRequest class?

5

This method is used to specify that current record will be submitted to which procress. If one object have multiple approval process and many of them does not match criteria then you will get an exception if you try to submit your record in them. To over come this its better if you specify your particular process to handle the request.

As per Salesforce docs

The process definition developer name or process definition ID. The record is submitted to this specific process. If set to null, submission of a record approval follows standard evaluation; that is, every entry criteria of the process definition in the process order is evaluated and the one that satisfies is picked and submitted.

setProcessDefinitionNameOrId

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.