function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFDCDevQASFDCDevQA 

Updating Quote2Pdf pages, classes and templates

I am trying to find a way to make a sophisticated looking pdf quote that the sales reps can easily send out via email or print and mail.  The PDF editor is just not very nice looking and not very customizable.  I found an old app that you can install called "Visualforce Quote2PDF"  that is awesome but it uses a custom quote object and quote line object because it was created before the standard quotes object came out.(you can read info about it here: http://wiki.developerforce.com/index.php/Visualforce_EmailQuote2PDF  and install it from here Quote2PDF: https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t30000000SyGR

Anyway so I am trying to modify the code to work with the new Standard Quotes system but I am running into trouble because it is telling me that "Quote does not exist" when I try to replace instances of Quote__c with just Quote.  There are multiple visual force pages, a couple of apex classes and a Visualforce email template involved but no matter which Visualforce page I try to edit they all say that "Quote does not exist" and the email template says "The template relatedTo type must be a valid SObject, not Quote." and the classes say "Error: Compile Error: sObject type 'Quote' is not supported" or "Error: Compile Error: Invalid type: Quote"

Any ideas as to why this is happening?

 

Here's an example of one of the small VF Pages:

(original)

<apex:page standardController="Quote__c" Extensions="quoteExt" action="{!attachQuote}">
    {!Quote__c.Opportunity__c}{!Quote__c.name}
</apex:page>

(with my edits)

<apex:page standardController="Quote" Extensions="quoteExt" action="{!attachQuote}">
    {!Quote.Opportunity}{!Quote.name}
</apex:page>

 

Help me Obi-Wan Kenobi, you're my only hope!  (sorry, couldn't help myself) 

Best Answer chosen by Admin (Salesforce Developers) 
Will MoxleyWill Moxley

There will be more enhancements to the quote template editor in the next release.  What features did you need?  There will be images, repeating headers and footers, preview capabilities, field alignment, hiding labels, rich text areas where you can put boilerplate legal text, and sections that span the entire width of the page with 1 column.

 

Safe harbor of course.

All Answers

aballardaballard

Have you enable Quotes for your org (customize/quotes/settings under setup) ? 

You won't  be able to reference it in a page until you do.

SFDCDevQASFDCDevQA

Yes, the Quotes object is enabled and I even already have quotes with quote line items in place and have tested the little pdf quote editor but it is just not robust enough for my needs.  I really like what this set of VF Pages and templates can do if only I could get them to work with the now standard quote object instead of a custom one.

Thanks,

Amanda

Will MoxleyWill Moxley

There will be more enhancements to the quote template editor in the next release.  What features did you need?  There will be images, repeating headers and footers, preview capabilities, field alignment, hiding labels, rich text areas where you can put boilerplate legal text, and sections that span the entire width of the page with 1 column.

 

Safe harbor of course.

This was selected as the best answer
GoForceGoGoForceGo

 

Instead of using the quote template editor, is there a way of hooking in a visual force e-mail template instead?

 

 

 

.

Will MoxleyWill Moxley

Yes. That is the approach we recommended to customers before we had the quote template editor.  You can probably remove the standard buttons from the page layout of at least add your own button that invoke a custom visualforce page.

GoForceGoGoForceGo

It would be nice to provide an ability to define VF pages, in addition to the template editor. So the standard "Create Pdf" button would see this as one of the available templates.

 

In the meantime, I guess I could create a QuoteDocument object as suggested by Bob-Buzzard. I could add a custom button on the standard quote object to create this object, or write an after insert trigger on quote to automatically create it.

 

http://boards.developerforce.com/t5/Visualforce-Development/Quotes-Using-a-VisualForce-Page-instead-of-Quote-Template-Editor/m-p/256603#M33352