Call widget from button on service portal

Tomer
Kilo Expert

Hello Snow community, 

we are using custom form on service portal to show incident details. therefore, I need to create a custom button (like ui action) for users, which will allow them to reopen an incident.

I successfully create a widget based on:

https://www.servicenowelite.com/blog/2017/5/12/service-portal-resolve-incident-button

 

find_real_file.png

but, I need to call it on my custom form from the regular button (Reopen incident) and not from the green top right corner, and I don't know how.

I tried this:

$scope.reOpenincident = function() {
g_form.submit('sysverb_update_and_stay');
spModal.open({
widget:'re_open_incident',
//widgetInput:{param1:0},
size:'md'}).then(function() {



})
}

but it just open an empty modal, not calling my widget.

did someone face this before?

Thanks in advance,

Tomer.

1 REPLY 1

Omkar Mone
Mega Sage

Hi 

Check this link once :-

https://neuralworkz.wordpress.com/2018/04/13/embedded-widget-in-servicenow-service-portal/