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

How to add custom button in a Report

Is there option available in Salesforce to add a custom button in Report?
Please let me know, its urgent.

Thanks in advance

Well you can't add a custom button in a report. But there is a workaround available. You can always add a formula field to the object and this formula field will actually will link the record to a VF page from where you can do some action.

You can have a formula that will generate a url like '/apex/MYVFPAGE?id=<RecordId>'

Once user clicks on the formula field he will be redirected to the VF page and some action can be done from the controller/page action

Yes. But the formula field will appear in every record detail page (if added at layout) and if I add field in Report, then in repost column links fo each record.

I need something to do on top pf Report. Like, A report has Printable View button for entire Report.

Correct me if I am wrong in understanding your solution.
Thanks for replying:-)


Yes the formula field will appear on all the records.
Another solution would be creating a VF page with button and including the report in a iframe.

This way you will be able to display a single button.
[But not sure if it will help you out, like printable view etc, I guess you can link the button with the printable view (Hopefully)]


Thanks. But this option I willl try to propose. Let see what waits. thanks for reply.:-)