Newer Version Available
ProcessSubmitRequest Class
Namespace
Usage
You must specify the Approval namespace when creating an instance of this class. The constructor for this class takes no arguments. For example:
1Approval.ProcessSubmitRequest psr = new Approval.ProcessSubmitRequest();Inherited Methods
In addition to the methods listed, the ProcessSubmitRequest class has access to all the methods in its parent class, ProcessRequest Class.
Example
To view sample code, refer to Approval Processing Example.
ProcessSubmitRequest Methods
The following are methods for ProcessSubmitRequest. All are instance methods.
getObjectId()
Signature
public String getObjectId()
Return Value
Type: String
getProcessDefinitionNameOrId()
Signature
public String getProcessDefinitionNameOrId()
Return Value
Type: String
Usage
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.
getSkipEntryCriteria()
Signature
public Boolean getSkipEntryCriteria()
Return Value
Type: Boolean
getSubmitterId()
Signature
public String getSubmitterId()
Return Value
Type: String
setObjectId(recordId)
Signature
public Void setObjectId(String recordId)
Parameters
- recordId
- Type: String
Return Value
Type: Void
setProcessDefinitionNameOrId(nameOrId)
Signature
public Void setProcessDefinitionNameOrId(String nameOrId)
Parameters
- nameOrId
- Type: String
- 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.
Return Value
Type: Void
Usage
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.
setSkipEntryCriteria(skipEntryCriteria)
Signature
public Void setSkipEntryCriteria(Boolean skipEntryCriteria)
Parameters
- skipEntryCriteria
- Type: Boolean
- If set to true, request submission skips the evaluation of entry criteria for the process set in setProcessDefinitionNameOrId(nameOrId). If the process definition name or ID is not specified, this parameter is ignored and standard evaluation is followed based on process order. If set to false, or if this method isn’t called, the entry criteria is not skipped.
Return Value
Type: Void
setSubmitterId(userID)
Signature
public Void setSubmitterId(String userID)
Parameters
- userID
- Type: String
- The user ID on behalf of which the record is submitted. If set to null, the current user is the submitter. If the submitter is not set with this method, the default submitter is null (the current user).
Return Value
Type: Void