How to add a fixed query for Add button on 'task_cmdb_ci_service' table and only for incident table

Aditi6
Tera Contributor

Hi All,

 

I have a requirement to add a query - 'ref_cmdb_ci_service_auto.service_classification=Application Service^ref_cmdb_ci_service_auto.busines_criticality=1^operational_status=1' on Add button on impacted services related list of incident table.

 

The above query must not be implemented to any other table.

Please help me with step by step implementation, since I am very new with SOW.

Regards,
AG

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@Aditi6 

this link has solution, check and enhance so that it impacts only when that is shown on INC form

Apply Filter to ADD Button on Impacted Services/CI RelatedList 
💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Will this solution apply for SOW? I do not want query to applied in native UI.

Ankur Bawiskar
Tera Patron
Tera Patron

@Aditi6 

in the _getURL() method I added this code highlighted so that the query only works for INC

AnkurBawiskar_0-1767100097344.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar  : Many thanks for your quick response.

 

I edited the script include but same query is not applying in Service Operations Workspace, when you try to add any impacted services in any existing incident. 

Any insights on it. Does the above code works for you in  SOW?