You must specify the Approval namespace when creating an instance of this class. The constructor for this class takes no arguments. For example:
Approval.ProcessSubmitRequest psr = new Approval.ProcessSubmitRequest();
In addition to the methods listed, the ProcessSubmitRequest class has access to all the methods in its parent class, ProcessRequest Class.
To view sample code, refer to Approval Processing Example.
The following are methods for ProcessSubmitRequest. All are instance methods.
public String getObjectId()
Type: String
public String getProcessDefinitionNameOrId()
Type: String
The default is null. If the return value is null, when a user submits a record for approval Salesforce evaluates the entry criteria for all processes applicable to the user.
public Boolean getSkipEntryCriteria()
Type: Boolean
public String getSubmitterId()
Type: String
public Void setObjectId(String recordId)
Type: Void
public Void setProcessDefinitionNameOrId(String nameOrId)
Type: Void
If the process definition name or ID is not set via this method, then by default it is null. If it is null, the submission of a record for approval evaluates entry criteria for all processes applicable to the submitter. The order of evaluation is based on the process order of the setup.
public Void setSkipEntryCriteria(Boolean skipEntryCriteria)
Type: Void
public Void setSubmitterId(String userID)
Type: Void