The CreatorCon Call for Content is officially open! Get started here.

Disable "Add All" button when linking incidents to problems

Gareth Davies1
Mega Guru

I'm looking at the "Add" UI action for incident that's used when adding incidents to a problem record. I'm trying to hide the "Add All" button if there are >100 incidents in the list. Allowing someone to link 4.5 million incidents to a problem with one click is NOT something that's going to happen!

Screenshot 2023-02-06 142036.png

However, the UI action calls a function called getURL in the BulkAddIncidents script include which sends the UI action off to open incident_add_records.do as an iframe in a modal. Happy days, I think.

 

Except incident_add_records.do is not the endpoint of a UI page, it's not a processor, I have absolutely no idea what it is. Does anyone have any idea where the definition of that page lives or how I can remove that button under specific conditions? 

5 REPLIES 5

ShreeMan
Tera Contributor

Any solution on this?? I am also facing same issue.

lucascaixeta
ServiceNow Employee
ServiceNow Employee

Hi, I might have found what you are looking for.

 

Please follow the steps:

 

 > Under "Workspace Experience" > "Action & Components" > Click on "Related List Actions" to go to the table sys_declarative_action_assignment

 > Filter by:

 

Action Label: Add

Table: incident

 

> Open the record with the description "Add Incidents to Problem Record" (7a5f33ccc3621010e8a0a6bec840dd6c)

> On the "Related Links", click on advanced view

> Check out on the "Conditions tab" for Script Conditions

 

Add All button on the incident.problem_id Related listAdd All button on the incident.problem_id Related list

 

Hope this helps

I'm looking at the "Add" UI action for incident that's used when adding incidents to a problem record. I'm trying to hide the "Add All" button and I want that no one should be able to click on 'Add All' button, want to make it un-clickable or hide this button.

 

ShreeMan_0-1690358655156.png

 

Thanks for finding this, but this is the 'Add' button on the related list. What we're looking for is the 'Add All (###)' button on the modal that this opens. I think that code might be one of those things that lives on the backend, and isn't accessible in the instance.