The API retrieves the templates associated with the given proposal.

APISignature
getTemplatesForProposalwebService static List getTemplatesForProposal(Id proposalId, String proposalType)



Request Parameter
NameTypeDescription
proposalIdID

The ID of the proposal.

proposalTypeStringThe type of template to query



Response Parameter
FieldTypeDescription
templateSOsList<Apttus__APTS_Template__c>The list of templates matching the configured query criteria.


Code Sample

The sample code below enables you to retrieve the list of templates for the given proposal.


/**
 * The below code demonstrates how to get list of template records for the given proposal
 */
public List<Apttus__APTS_Template__c> getTemplatesForProposal(String proposalName) 
{
    Id proposalSOID = [SELECT Id FROM Apttus_Proposal__Proposal__c WHERE Name =: proposalName LIMIT 1].Id;
	List<Apttus__APTS_Template__c> templateSOs = new List<Apttus__APTS_Template__c>();
    templateSOs = Apttus_Proposal.ProposalWebService.getTemplatesForProposal(proposalSOID,'Proposal');
    return templateSOs; 
}
CODE