Need help to make UI action conflict calendar work in workspace

Community Alums
Not applicable

Hi, all, we have an OOTB UI action for change_request table: conflict calendar, it works great in classic form, but not in workspace form. 

Here is the script I used:

bigguyjun1_0-1710778014314.png

 

I got error: SCRIPT:EXEC Error while running Client Script "GlideScopedScript": ReferenceError: g_navigation is not defined
Please help. Thanks.

7 REPLIES 7

Bert_c1
Kilo Patron

Can you try:

 

action.setRedirectURL(current);

 

instead of what you have?

Community Alums
Not applicable

Thanks for the reply. You want me to remove g_navigation.open("$change_request_calendar_view.do?sysparm_changeId=" + g_form.getUniqueValue());"? 
My question is: If I remove everything and add: 

action.setRedirectURL(current);

How could UI action work to display calendar page? Thanks.

I suggest looking at OOB UI Actions that do the same. From my "Conflict Calendar" UI Action, it has the following:

 

	g_navigation.open("$change_request_calendar_view.do?sysparm_changeId=" + g_form.getUniqueValue());

 

Seems what you last posted should work.

Community Alums
Not applicable

Not working. Got error: SCRIPT:EXEC Error while running Client Script "GlideScopedScript": ReferenceError: g_navigation is not defined