- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2022 05:12 AM
Hello,
I need to create a UI Action button on a form which show all incident which are pending on the assigned user.
After clicking the button it will show all the incident in a list view with some fields like Incident no., priority, status etc.
For Example- i open a Incident which is assigned to Matt and i want to see all the incident which are pending on him so i just click on a button from the form which will open a list view containing all the incident assigned to Matt.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2022 05:43 AM
Hello,
Please create new UI action as per below screen shot -
var assign = current.assigned_to;
var url='/incident_list.do?sysparm_query=state=2^assigned_to='+assign+'&sysparm_view=pending_inc';
action.setRedirectURL(url);
Regarding column in list, please create view from list layout and add required columns -
Regards,
Akshay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2022 05:40 AM
Create a UI action with some name on incident table
Form button as true
Put condition as:
current.assigned_to != ''
and enter below in script field
var url = "/incident_list.do?sysparm_query=assigned_to=" + current.getValue("assigned_to") + '^state=1&sysparm_view=';// you can create view with specific columns and set in sysparm_view attribute and also state based on your requirement
action.setRedirectURL(url);
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2022 05:42 AM
Hello Siddharth
you can just add Related list of callers incidents on the Incident form - it would be quickest and simplest way to approach this issue.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2022 05:54 AM
This approach is good, but challenge with this is that it will take processing time every time the form loads, even when you need the details or not, for UI action it will only take processing time, when you need it.
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2022 05:43 AM
Hello,
Please create new UI action as per below screen shot -
var assign = current.assigned_to;
var url='/incident_list.do?sysparm_query=state=2^assigned_to='+assign+'&sysparm_view=pending_inc';
action.setRedirectURL(url);
Regarding column in list, please create view from list layout and add required columns -
Regards,
Akshay