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
miteshsuramiteshsura 

Print multiple items at once

Hi,

 

I would like to allow user to print multiple line items in related list at once, instead of printing one item at a time. 

 

For eg in the related list I would have a button that says "Print line items" and it should take user to printview of those selected line items. 

Can Pagereference class help? 

 

URL that Sf generates for individual line item is like: https://na7.salesforce.com/001xxxxxxxxxxxxxx/p

 

any help is appreciated. 

thanks

Best Answer chosen by Admin (Salesforce Developers) 
miteshsuramiteshsura

I found the solution, not an elgant, but still works. 

 

I pass the selected ids for the items that I need to print to a VF page. That VF page has a repeat tag and generates the print URL. 

I cannot get rid of standard buttons on right hand side, nor I have any control over the Print Page Layout. The idea of Print page layout is already on IdeaExchange site. 

 

Hope it helps someone. 

All Answers

miteshsuramiteshsura

I found the solution, not an elgant, but still works. 

 

I pass the selected ids for the items that I need to print to a VF page. That VF page has a repeat tag and generates the print URL. 

I cannot get rid of standard buttons on right hand side, nor I have any control over the Print Page Layout. The idea of Print page layout is already on IdeaExchange site. 

 

Hope it helps someone. 

This was selected as the best answer
prateek___3prateek___3

hi can u put soem code