This API enables you to delete one or more attachments from a runtime adhoc approval process. This API accepts the context object type, id, and list of attachment IDs to delete as input parameters and returns true if the attachments were successfully deleted.

APISignature
DeleteAttachmentsFromRuntimeAdhocApprovalProcesswebService static Boolean DeleteAttachmentsFromRuntimeAdhocApprovalProcess(String sObjectType, Id sObjectId, List attachmentIds)
Request Parameters
NameTypeRequired?Description
sObjectIdIDYesId of the approval context object.
sObjectTypeTypeYesType of the approval context object.
attachmentIdsListYesList of attachment Id's to remove.
Response Parameter
NameTypeDescription
resultBooleanReturns true if the attachments are removed successfully.

Code Sample

/**
	 * Delete attachments from a runtime adhoc approval process
	 * @param sObjectType the approval context sobject type 
	 * @param sObjectId the approval context sobject identifier
	 * @param attachmentIds the list of attachment ids to remove
 	 * @return <code>true</code> if the attachments were removed, <code>false</code> otherwise 
	 */
	WebService static Boolean DeleteAttachmentsFromRuntimeAdhocApprovalProcess(String sObjectType, ID sObjectId, List<ID> attachmentIds);
CODE

Integration Details

Use the following information in your integrations with Apttus Intelligent Workflow Approvals API. Refer to Integrating Apttus with External Systems for information on how to get started.

API Prerequisites

None.

Response/Request XML

Example Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:app="http://soap.sforce.com/schemas/class/Apttus_Approval/ApprovalsWebService">
   <soapenv:Header>      
      <app:SessionHeader>
         <app:sessionId>00DR0000001nyVR!ARYAQNCIk5WB9S9PlmZzS2uecBjxnhB20ndYmyxseH1LEfStQi1cXAtXiDxEyd3kAbYrAXbpJmDZzVXGxrxxleE8Fmm6kqSm</app:sessionId>
      </app:SessionHeader>
      </soapenv:Header>
   <soapenv:Body>
      <app:DeleteAttachmentsFromRuntimeAdhocApprovalProcess>
         <app:sObjectType>Apttus__APTS_Agreement__c</app:sObjectType>
         <app:sObjectId>a07R0000009z33H</app:sObjectId>
      </app:DeleteAttachmentsFromRuntimeAdhocApprovalProcess>
   </soapenv:Body>
</soapenv:Envelope>
XML

Example Response

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://soap.sforce.com/schemas/class/Apttus_Approval/ApprovalsWebService">
   <soapenv:Body>
      <DeleteAttachmentsFromRuntimeAdhocApprovalProcessResponse>
         <result>true</result>
      </DeleteAttachmentsFromRuntimeAdhocApprovalProcessResponse>
   </soapenv:Body>
</soapenv:Envelope>
XML