PDF
Download PDF
Download page Getting the Proposal Document Output Format.
Getting the Proposal Document Output Format
This API retrieves the proposal document output format for a specific user profile.
API | Signature |
---|---|
getDefaultOutputFormat | webService static Apttus_Proposal__Proposal_Document_Output_Format__c getDefaultOutputFormat(Id profileId, Id recordTypeId) |
Request Parameter | ||
---|---|---|
Name | Type | Description |
profileId | ID | The ID of the profile. |
recordTypeId | ID | Record Type of the proposal object |
Response - Apttus_Proposal__Proposal__c | ||
---|---|---|
Field | Type | Description |
Id | ID | Record ID of the proposal. |
Name | String | The name of the proposal |
Apttus_Proposal__Profile_Id__c | ID | The Id of the profile. |
Apttus_Proposal__Output_Format__c | String | The document output format (For example PDF, RTF or DOC or DOCX) |
Apttus_Proposal__IncludeWatermark__c | Boolean | Indicates whether a watermark is added to the document. |
Apttus_Proposal__Allow_Override__c | Boolean | Indicates whether you are allowed to override the default output format during the quote/proposal document generation process. |
Apttus_Proposal__AllowOverrideWatermark__c | Boolean | Indicates whether you are allowed to override the default watermark setting during the quote/proposal document generation process. |
Apttus_Proposal__Proposal_Type_Id__c | String | The type of proposal |
CurrencyIsoCode | String | The currency defined for the proposal. |
Code Sample
The sample code below enabled you to retrieve the proposal document output format for the given user profile and record type name.
/**
* The below code demonstrates how to get the document output format for given profile name.
*/
Public Static Id getProfileID (String profileName)
{
return [SELECT id FROM profile WHERE Name =: profileName LIMIT 1].Id;
}
public Id getProposalRecordTypeId(String proposalRecordTypeName)
{
return [SELECT ID
FROM recordType
WHERE sObjectType='Apttus_Proposal__Proposal__c'
AND Name =: proposalRecordTypeName
LIMIT 1].Id;
}
Public static Apttus_Proposal__Proposal_Document_Output_Format__c getDocumentOutputFormat (String profileName, String recordTypeName )
{
ID profileID = getProfileID(profileName);
ID proposalRecordTypeId = getProposalRecordTypeId(recordTypeName);
Apttus_Proposal__Proposal_Document_Output_Format__c outputFormatSO = new Apttus_Proposal__Proposal_Document_Output_Format__c();
outputFormatSO = Apttus_Proposal.ProposalWebService.getDefaultOutputFormat();
return outputFormatSO;
}
CODE
Integration Details
Use the following information in your integrations with CPQ Web Services API. Refer to Integrating Conga 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:prop="http://soap.sforce.com/schemas/class/Apttus_Proposal/ProposalWebService">
<soapenv:Header>
<prop:SessionHeader>
<prop:sessionId>00DZ000000NAEIA!ASAAQKosATSpsGeD7FUh4RDI18xnzIFPe80Mk89ejrAmDrCBY2lmyJKQjKvuwj3TvT71r6g_epvbo6FeqKUPfmSookHTttOu</prop:sessionId>
</prop:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<prop:getDefaultOutputFormat>
<prop:profileId>00eZ0000000Uhkn</prop:profileId>
<prop:recordTypeId>012i00000001ECb</prop:recordTypeId>
</prop:getDefaultOutputFormat>
</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_Proposal/ProposalWebService" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<getDefaultOutputFormatResponse>
<result xsi:type="Apttus_Proposal__Proposal_Document_Output_Format__c">
<Id>a0bZ0000008cMKnIAM</Id>
<Apttus_Proposal__AllowOverrideWatermark__c>true</Apttus_Proposal__AllowOverrideWatermark__c>
<Apttus_Proposal__Allow_Override__c>true</Apttus_Proposal__Allow_Override__c>
<Apttus_Proposal__IncludeWatermark__c>true</Apttus_Proposal__IncludeWatermark__c>
<Apttus_Proposal__Output_Format__c>DOCX</Apttus_Proposal__Output_Format__c>
<Apttus_Proposal__Profile_Id__c>00eZ0000000UhknIAC</Apttus_Proposal__Profile_Id__c>
<Apttus_Proposal__Proposal_Type_Id__c>012i00000001ECbAAM</Apttus_Proposal__Proposal_Type_Id__c>
<Name>a0bZ0000008cMKn</Name>
</result>
</getDefaultOutputFormatResponse>
</soapenv:Body>
</soapenv:Envelope>
XML