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
JohnDuraiJohnDurai 

Adding "Print" Button on Record Detail Page

I need to add "Printable View" Button to the Record page of Account object for only two Record types. If they click Printable view button it navigate to next tab and show the Account Detail Record as well as the related list records. Any suggestion would be helpful to implement this functonality. Thanks! 
Best Answer chosen by JohnDurai
AbhishekAbhishek (Salesforce Developers) 
The "Printable view" button can be added on individual page layouts, in the Salesforce Mobile and Lightning Experience Actions section. 

Considering you only want it available for 2 record types, you'd have to create if you don't already have another page layout to assign to those. 


Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks.

All Answers

Shubham Bansal 45Shubham Bansal 45
For salesforce lightning, you can navigate to Object manager choose user account in ur case Choose account then choose Button and links from left side menu and create a button, add these buttons to your page layout which is used in your 2 record types. inside the button write your code fo print or what you want
AbhishekAbhishek (Salesforce Developers) 
The "Printable view" button can be added on individual page layouts, in the Salesforce Mobile and Lightning Experience Actions section. 

Considering you only want it available for 2 record types, you'd have to create if you don't already have another page layout to assign to those. 


Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks.
This was selected as the best answer
JohnDuraiJohnDurai
Thanks it helps, I have created Button, user needs see the print preview  button open in a new browser window which contains all Detail fields visible and related list fields to be visible. can someone suggest/help for code. Thanks!