Custom Template Salesforce CPQ: Visualforce CPQ custom Quote Template
Custom
Select this option to use a Visualforce component in the Custom Source field that you want to show in this section of your quote template. Enter the full URL for the Visualforce page that generates this content, using the following format (page name must end with the “c__” prefix): https://c.<instance>.force.com/apex/c__OptivTemplateSectionComponent. The Visualforce component must be compatible with XML (specifically XSL-FO) to work with Salesforce QTC document output.
XSL-FO is just like HTML encoded language and we need undersatand how this language will help us in desining and defining custom tamplate. For more XSL-FO you can dig into following URL:
Note: Plase save your images in document, and then copy the address of document Image and replace it with source Image Address. src.
Here is the Sample output:
For more help click here and subscribe my Youtube channel:
Salesforce CPQ AMUL BARANWAL
In Salesforce while defining quote Template Admin can choose following type of template content:
In this Blog, we will learn and see how this custom Quote Template content will help in order to generate custom table, graphics in the same quote pdf doc file.
Definition from Salesforce CPQ( see Salesforce guide Book. Taken Reference from https://help.salesforce.com/articleView?id=cpq_template_content.htm&type=5)
- https://www.webucator.com/tutorial/learn-xsl-fo/tables.cfm
- http://w3schools.sinsixx.com/xslfo/obj_table-header.asp.htm
- https://www.antennahouse.com/support/v2qa/QA-fo.html#QA2003082203
In this CPQ Custom template Blog page i would take one example and will see how this XSL-FO Santax we can use in Visualforce Page to generate pdf document: This pdf will show custom table as well as image while generating Quote pdf.
Sample VF Page:
This will display one Image on Top Right with Two Table
<apex:page showHeader="false" sidebar="false" cache="false" contentType="text/xml" controller="CustomQuoteLineCtrl" action="{!init}"> <block-container> <block text-align="right"> <external-graphic src="https://cpqsep-dev-ed--c.ap4.content.force.com/servlet/servlet.ImageServer?id=0156F00000G41n0&oid=00D6F000002W0zo&lastMod=1541150013000" content-height="scale-to-fit" height="1.5in" content-width="2.00in" scaling="non-uniform"/> </block> <table border-bottom-style="solid" table-layout="fixed" width="100%" margin-top="10pt"> <table-header text-align="center" background-color="silver"> <table-cell display-align="center" padding="5" border="1pt solid #800000" number-columns-spanned="2"> <block font-weight="bold" text-align="left"><inline color="#FFFFFF">ANNUAL SERVICES</inline></block> </table-cell> </table-header> <table-body> <table-row border="1pt solid #800000"> <table-cell display-align="center" padding="5" border="1pt solid #800000" background-color="#800000" > <block font-weight="bold" text-align="left"><inline color="#FFFFFF">TierName Column Heading </inline></block> </table-cell> <table-cell display-align="center" padding="5" border="1pt solid #800000" background-color="#800000"> <block font-weight="bold" text-align="left"><inline color="#FFFFFF">TierPrice Column Heading </inline></block> </table-cell> </table-row> <table-row border="1pt solid #800000"> <table-cell display-align="center" padding="5" border="1pt solid #800000"> <block text-align="left">TierName Column Heading </block> </table-cell> <table-cell display-align="center" padding="5" border="1pt solid #800000"> <block text-align="left">TierPrice Column Heading </block> </table-cell> </table-row> <table-row border="1pt solid #800000"> <table-cell display-align="center" padding="5" border="1pt solid #800000"> <block text-align="left">TierName Column Heading </block> </table-cell> <table-cell display-align="center" padding="5" border="1pt solid #800000"> <block text-align="left">TierPrice Column Heading </block> </table-cell> </table-row> <table-row border="1pt solid #800000" > <table-cell display-align="center" padding="5" border="1pt solid #800000" number-columns-spanned="2"> <block text-align="left">TierName Column Heading </block> </table-cell> </table-row> </table-body> </table> </block-container> <block-container margin-top="40pt"> <table border-bottom-style="solid" table-layout="fixed" width="100%" > <table-header text-align="center" background-color="silver"> <table-cell display-align="center" padding="5" border="1pt solid #800000" number-columns-spanned="2"> <block font-weight="bold" text-align="left"><inline color="#FFFFFF">PROFESSIONAL SERVICES</inline></block> </table-cell> </table-header> <table-body> <table-row border="1pt solid #800000"> <table-cell display-align="center" padding="5" border="1pt solid #800000" background-color="#800000" > <block font-weight="bold" text-align="left"><inline color="#FFFFFF">TierName Column Heading </inline></block> </table-cell> <table-cell display-align="center" padding="5" border="1pt solid #800000" background-color="#800000"> <block font-weight="bold" text-align="left"><inline color="#FFFFFF">TierPrice Column Heading </inline></block> </table-cell> </table-row> <table-row border="1pt solid #800000"> <table-cell display-align="center" padding="5" border="1pt solid #800000"> <block text-align="left">TierName Column Heading </block> </table-cell> <table-cell display-align="center" padding="5" border="1pt solid #800000"> <block text-align="left">TierPrice Column Heading </block> </table-cell> </table-row> <table-row border="1pt solid #800000"> <table-cell display-align="center" padding="5" border="1pt solid #800000"> <block text-align="left">TierName Column Heading </block> </table-cell> <table-cell display-align="center" padding="5" border="1pt solid #800000"> <block text-align="left">TierPrice Column Heading </block> </table-cell> </table-row> <table-row border="1pt solid #800000" > <table-cell display-align="center" padding="5" border="1pt solid #800000" number-columns-spanned="2"> <block text-align="left">TierName Column Heading </block> </table-cell> </table-row> </table-body> </table> </block-container> </apex:page>
Note: Plase save your images in document, and then copy the address of document Image and replace it with source Image Address. src.
<external-graphic src="https://cpqsep-dev-ed--c.ap4.content.force.com/servlet/servlet.ImageServer?id=0156F00000G41n0&oid=00D6F000002W0zo&lastMod=1541150013000" content-height="scale-to-fit" height="1.5in" content-width="2.00in" scaling="non-uniform"/>
For more help click here and subscribe my Youtube channel:
Salesforce CPQ AMUL BARANWAL
17 Comments
Custom Template:
ReplyDeletehttps://youtu.be/3gpm1VpAZi0
Atocloud easiest admins work of creating bulk fields/objects in salesforce, It would be tedious job to copy and click each object one by one using Salesforce Standard process. These type of work requests would take more effort and time, so one of the best option to overcome this situation is by using the this appexchange tool called Salesforce Bulk Object Field Creator (BOFC)
ReplyDeleteHi,
ReplyDeleteHow can is put rendered check on table?
Thanks
Thanks for post.It's truly informative will surely keep visiting the website.
ReplyDeletesalesforce application development in USA
salesforce development course in NewYork
Its really an Excellent post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog. Thanks for sharing.
ReplyDeleteSalesforce CRM Data Migration Services
This is one awesome blog article. Much thanks again. salesforce cpq certification
ReplyDelete
ReplyDeleteWhatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly, but it’s no need to do it, because you have explained the concepts very well. It was crystal clear.i also want to inform you the best salesforce cpq training . thankyou . keep sharing..
Can we display an image stored in a static resource instead of saving it in a document?
ReplyDeleteI tried to use this with SOQL query but not ableto use table tab at all with that. can you help me?
ReplyDeletehello, can you help why I get this err?
ReplyDeleteorg.apache.commons.httpclient.RedirectException: Maximum redirects (100) exceeded
waiting to the next Tableau Online Training
ReplyDeleteAWS Online training
Dot Net OnlineTraining
DevOps Online Training
Selenium Online Training
It is challenging to provide the same value at external hybrid events as in-person attendees are able to network more freely and engage easily with content than those attending virtually. virtual edge and thank you email after successful event
ReplyDeleteThanks for Sharing This Blog .Really Usefull Information You Shared.
ReplyDeleteSales Force CPQ Online Training Hyderabad
Visit us: sales force CPQ Online Training
Hi, how can we display bullet point to the template or the quote line group's description field which is a rich text area
ReplyDeletekayseriescortu.com - alacam.org - xescortun.com
ReplyDeletemmorpg oyunlar
ReplyDeleteinstagram takipçi satın al
Tiktok Jeton Hilesi
TÄ°KTOK JETON HÄ°LESÄ°
antalya saç ekimi
İNSTAGRAM TAKİPÇİ SATIN AL
İnstagram takipçi
metin2 pvp serverlar
Instagram Takipçi
Nice blog, Thanks For Sharing This Informative Article.
ReplyDeleteCpq Salesforce Training
Salesforce Cpq Course