ServiceNow Learning 68: Add UI Action under Related Link "Show Flow designer"

Shamma Negi
Kilo Sage
Kilo Sage

Hi All,

 

I have built this UI action which is really beneficial for me. I am sure it would help you also. It gives the same features as Show Workflow gives. It takes you to a page wherein it shows how many flows ran on this record. See the code below:

 

UI Action Name: Show Flow Designer

 

UI Action Script

 

function openRecordInKBPortal() {

    alert(g_form.getUniqueValue());

    var url = '$flow-designer.do?sysparm_nostack=true&sysparm_use_polaris=false#/operations/context/' + g_form.getUniqueValue();

    var url1 = 'sys_flow_context_list.do?sysparm_query=source_record%3D' +g_form.getUniqueValue() +'&sysparm_view=welcome_hub_context';

    alert(url1);

    g_navigation.openPopup(url1);

 

}

 

It helped me alot to find out multiple flows running on this records as I have multiple flows running on single record.

 

Hope this helps you.

I hope this article helpful. Please mark it as helpful and bookmark if you like it.

 

Regards,

Shamma

Regards,Shamma Negi
1 ACCEPTED SOLUTION

Try this:

 

1. Check Client Callable Checkbox

2. Put a Onclick function: openRecordInKBPortal()

 

Regards,

Shamma

Regards,Shamma Negi

View solution in original post

3 REPLIES 3

SNOW_Satya
Tera Contributor

Is there anything we need to change on the script bcoz it's not working for me 

Try this:

 

1. Check Client Callable Checkbox

2. Put a Onclick function: openRecordInKBPortal()

 

Regards,

Shamma

Regards,Shamma Negi

Now it's working as Expected Thank You!!!