Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Need help on UI Action to redirect to portal

shaik_irfan
Tera Guru

Hi,

 

I have a button created on incident form when i click on it i want to redirect to Service portal categories place.

 

https://dev82927.service-now.com/sp?id=sc_category

 

can anyone please help me on this

1 ACCEPTED SOLUTION

Glad that it worked.

to open in new tab use this

var url = '/sp?id=sc_category';

g_navigation.open(url, '_blank');

Let me know if I have answered your question.

If so, please mark my response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

8 REPLIES 8

Glad that it worked.

to open in new tab use this

var url = '/sp?id=sc_category';

g_navigation.open(url, '_blank');

Let me know if I have answered your question.

If so, please mark my response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Can you please tell me how to have this button only on related list  but not on actual list 

@shaik.irfan 

in the UI action condition use this

RP.isRelatedList()

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hey Ankur,

 

I have one UI Action button on a form that does several things depending on the values selected on the form/Interaction. When I check the box for client and add function code, all other codes within the UI Action stops working. For example:
If Incident is selected, then Interaction will redirect to Incident form. If Request is selected, another field is visible to select requested form. But when this certain valule is selected "abc123" I want the agent to be redirected to portal to "abc123" catalog item form to fulfill the request and submit. I also, would like the agent to be redirected back to the interaction (new record) after submitting "abc123" on the portal page. Any help will be appreciated.