• Michelle Poirier
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
I am using S-doc templates for quotes
I am trying to create a button on the opportunity level that will generate the quote pdf & save it to the opportunity files. 
I've tried flows/processes but it doesn't bring over quote line items and won't save in opps files. Any suggestions?
We used Sdoc to create PDFs 
ON Admin profile after creating my quote the pdf file auto generates for both record types. But when logged in as any other user we either get "PDF generation failed. Check the page markup is valid." or "insufficient access rights on cross-reference id" any suggestions?
I'm am trying to make a trigger to auto save pdf when quote status changes to presented 

Also, I have 2 templates - Would I need to specify which one to use?

I found the trigger below online but it's not working. 
Any suggestions?

https://developer.salesforce.com/forums/ForumsMain?id=906F0000000907dIAA

trigger createQuotePDF on Quote (after update) { List<QuoteDocument> sr = new List<QuoteDocument>(); for (Quote q: Trigger.new) if (q.Status == 'Presented'){ sr.add (new QuoteDocument( QuoteId = q.Id, VersionData = 'someValue')); } insert sr; }
I'm am trying to make a trigger to auto save pdf when quote status changes to presented 

Also, I have 2 templates - Would I need to specify which one to use?

I found the trigger below online but it's not working. 
Any suggestions?

https://developer.salesforce.com/forums/ForumsMain?id=906F0000000907dIAA

trigger createQuotePDF on Quote (after update) { List<QuoteDocument> sr = new List<QuoteDocument>(); for (Quote q: Trigger.new) if (q.Status == 'Presented'){ sr.add (new QuoteDocument( QuoteId = q.Id, VersionData = 'someValue')); } insert sr; }