How to access Incident Id from within Search Report Custom script?
Summary:
Content (required):
Hi,
We have Organization Search Report placed on an Incident Workspace. During the creation of New Incident, we want to restrict some account numbers from the Search Report when the Incident's certain field is set to a specific value (say 'abc').
Hence, we have written a custom script in the Search report and trying to access that specific field value of the Incident by writing a ROQL query and based on the field value we can detach the unwanted account records from the report.
This works when we hard code the Incident Id value in the ROQL query within custom script. But, we need to pass the Incident id value dynamically i.e the record id of the Incident in which the Search report is getting opened. If we can get the Incident id on which the search report is getting opened, then we can pass that in the where clause of the ROQL query to access specific field values of the Incident