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
Ranjith DevRanjith Dev 

window.print button to print the record detail page information

Hi Team,

I have custom window.print() button that print the data of record detail page information. when click on that button the text information is improper way. We have sections on record detail page i.e sections half text in one page another half text in another page. I want to print the information in section wise. Please help

Thank you
Ranjith



 
Santosh Kumar 348Santosh Kumar 348
Hi Ranjith,

If you are trying to print the Record Detail Page then there is no use for creating a custom button. Standard Button with name "Printable View" is already present but if you have created a custom component which you want to print then you have to build entore logic using custom CSS to print the page.

Mark this answer as the Best Answer if it has helped you.

Regards,
Santosh Kumar
Ranjith DevRanjith Dev
Hi Santhosh,

Thank you for your reply,

I want to print the some of the sections and realted list information, that is why we go for custom component. I have used the CSS styles but nothing seems to work out. I want to know the possibility cases through CSS or anyother.

Thank you.
 
Santosh Kumar 348Santosh Kumar 348
Hi Ranjith,

I would say your first option should be VF page as salesforce print is not that much advanced. Secondly you mus be using inline Css in your component or Vf pages then it will follow the same while printing else it won't display css properly.

If you have a option to use KENDO UI, then my suggestion would be to go with that as that is much better and advanced tool and can be easily integrated within salesforce.

Regards,
Santosh Kumar