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
DoubleADoubleA 

Print function in Salesforce

Hi,

This question is on behalf of a colleague of mine who brought up a question, however i'm unsure whether this would be apex development related.

 

Basically the problem is that a school requires certificates to be printed for it's students "Contacts" , so I suggested saving the certificate as a template and use the tags to populate the name which is fine.  However, the client would like a way to do this from the Student/Contact record.  Possibly a button to click that would allow them to Print the document. 

 

Has anyone done anything similar to this and could shed some light on the subject.

 

Much thanks

BritishBoyinDCBritishBoyinDC

Simplest method is to use a mail merge template in Word, and the user clicks the mail merge button on tasks, selects the template, and it will merge as required.

 

But a neater solution might be a simple Visualforce page, as you can control the styling, access directly via a button on the contact page, and print to PDF/Word, so control the output more easily.

 

Look in the visualforce docs for an example - if you are just merging contact fields, you shouldn't need a custom controller, just a basic understanding of the apex 'merge field' tags.

 

If you need more guidance, try re-posting in the VisualForce forum...