Creating a Task After Proposal is Presented
This API changes the approval status of a proposal to Presented and creates a task.
API |
Signature |
---|---|
afterPresent |
webService static Boolean afterPresent(Id proposalId) |
Request Parameter |
||
---|---|---|
Name |
Type |
Description |
proposalId | ID |
The ID of the proposal |
Response Parameter |
||
---|---|---|
Field |
Type |
Description |
isSuccess | Boolean |
Indicates whether the approval status was changed and task creation was successful |
Code Sample
The sample code below enables you to change the approval status of a proposal to Presented and create a task for the given proposal.
/**
* The below code demonstrates the task creation after changing approval status to ‘Presented’
*/
public Boolean afterPresent(String proposalName)
{
Boolean isSuccess;
Id proposalSOID = [SELECT Id FROM Apttus_Proposal__Proposal__c WHERE Name = :proposalName LIMIT 1].Id;
isSuccess = Apttus_Proposal.ProposalWebService.afterPresent(proposalSOID);
return isSuccess;
}