Download page Taking Ownership of an Approval Request.
Taking Ownership of an Approval Request
This API takes ownership of the given approval request. This API accepts Approval Request and Comments as request parameters. The same user has to run the API who wants to take ownership of the Approval Request.
User can provide comments, while taking ownership.
Response Parameter
Name
Type
Description
result
Boolean
Returns true if the API is executed successfully.
Sample Code
List<Apttus_Approval__Approval_Request__c> liApprovalRequests =
[Select Id From Apttus_Approval__Approval_Request__c Where Apttus_Approval__Object_Id__c = 'a3X4x000000AQtGEAW'
AND Apttus_Approval__Approval_Status__c = 'Assigned'];
if(!liApprovalRequests.isEmpty()){
List<Apttus_Approval.BulkActionRequest> actionRequests = new List<Apttus_Approval.BulkActionRequest>();
for(Apttus_Approval__Approval_Request__c approvalRequest : liApprovalRequests){
Apttus_Approval.BulkActionRequest req = new Apttus_Approval.BulkActionRequest();
req.requestId = approvalRequest.Id;
req.comments = 'Comment-1';
actionRequests.add(req);
}
if(!actionRequests.isEmpty()){
Boolean success = Apttus_Approval.ApprovalsWebService.takeOwnershipOfRequestsBulk(actionRequests);
System.debug('Bulk Take Ownership Job Id : ' + success);
}
}
CODE
Integration Details
Use the following information in your integrations with Conga Approvals API. Refer to Integrating Conga with External Systems for information on how to get started.