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
Anil_SinghAnil_Singh 

FSL "Create Service Report" button...hack!

Hi everyone... The FSL is installed in my org and I am trying to override the "Create Service Report" button from the WorkOrder record. Is it can be  possible to hack  this standard button, actually I need to.fire this Report based on condition. Please Help..
AbhishekAbhishek (Salesforce Developers) 
Hi Anil,

The easiest way is to remove your buttons and replace them with links included into the page itself (formula fields HYPERLINK or a VFP for different links according to the environment (classics or lightning)): https://success.salesforce.com/answers?id=9063A000000DiEIQA0

https://na1.salesforce.com/one/one.app#/sObject/00OR0000000PCHYMA4/view?t=1479844235107&fv0=param1
fv0 — The FV stands for "filter value," and is the name of the parameter. The 0 is the numerical order in which the filter appears in the report. 

https://help.salesforce.com/articleView?id=reports_filter_url.htm&type=5

If you want a button instead of a link, you can create a LEX component with JS controller using <lightning: button> and put it into the page too but the buttons will exist in LEX only (by definition, these buttons will not appear in Classics).

The new buttons on the top of the page are always Quick Actions in LEX and the associated components are popups, modal forms (indirection).

I hope this helps you.