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
LogeshLogesh 

Reg: Sending multiple records to printer directly by clicking a button in Salesforce

Hi Friends,

 

Is it possible to send multiple records to printer directly by clicking a button in salesforce?

 

Thanks,

Logesh

SFAdmin5SFAdmin5

Not sure about this.  I know you can put a javascript button on a page to print the page but I'm not sure how you might print multiple pages from a button click on a record.

 

What is the business case here?  Can you provide specifics on exactly where this button would be and what should be printed by clicking on it?

sfdcfoxsfdcfox

It is conceptually possible to (mostly) cause automated printing through the use of JavaScript. Just make a Visualforce page that calls window.print() after rendering the "multiple records" that you wish to print. My company's package only prints one record at a time, but the concept remains similar.

LogeshLogesh

Hi Ross/SfdcFox,

 

The use case is I have a custom object and it has salesforce standard attachment enabled. So, if there are 5 attachments for a record. I need to print the 5 attachments by clicking a print button.

Is it possible?

If possible, consider a case where the five attachments are of different file types, will it print?

Or will it print in a case if 5 attachments are of same file type?

 

Thanks,

Logesh

sfdcfoxsfdcfox

As far as printing the composite of several possibly different file types at once, that would most likely only be possible if the resources were all types that can be rendered natively by a browser (xml, png, gif, jpeg, html, etc). So, if the attachments were all images (even of different sub-types), you could render these into a page, then print the page. You wouldn't be able to easily print multiple files if they were any type other than a content type of "image/*" or "text/*", and even then, only if they were natively rendered by the browser's HTML engine.