Retrieving Name of the First Template
The API retrieves the name of the first template associated with the given proposal.
API |
Signature |
---|---|
selectFirstTemplateNameForProposal |
webService static String selectFirstTemplateNameForProposal(Id proposalId) |
Request Parameter |
||
---|---|---|
Name |
Type |
Description |
proposalId | ID |
The ID of the proposal. |
Response Parameter |
||
---|---|---|
Field |
Type |
Description |
templateName | String |
The name of the first template. |
Code Sample
The sample code below enables you to get the first template name associated to the given proposal.
/**
* The below code gets first template name.
*/
public String selectFirstTemplateNameForProposal(String proposalName)
{
String templateName;
Id proposalSOID = [SELECT Id FROM Apttus_Proposal__Proposal__c WHERE Name = :proposalName LIMIT 1].Id;
templateName = Apttus_Proposal.ProposalWebService.selectFirstTemplateNameForProposal(proposalSOID);
return templateName;
}