Create a UI action which show all the pending incident on the assigned user

Siddharth4
Tera Contributor

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.

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hello,

Please create new UI action as per below screen shot -

find_real_file.png

 

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 - 

find_real_file.png

Regards,

Akshay

View solution in original post

4 REPLIES 4

Aman Kumar S
Kilo Patron

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);

Best Regards
Aman Kumar

Wojtek Winnicki
Tera Guru

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.

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.

Best Regards
Aman Kumar

Community Alums
Not applicable

Hello,

Please create new UI action as per below screen shot -

find_real_file.png

 

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 - 

find_real_file.png

Regards,

Akshay