UI action > not possible to stay on record after update due to view rules ...?

Zod
Giga Guru

Hi all,

I'm on a form with a view forced via view rule ... . Now I have a UI action that will change the "reason" for the view to be forced to a value that will force an other view ... so after the update, I do not stay on the record (with the new view forced) as requested.

>>> action.setRedirectURL(current); at the end of the UI action does not work (most reasonable due to the forced view ... ). Any idea to workaround this issue?

Thank you!

1 ACCEPTED SOLUTION

Found a WORKAROUND ...


I just added required fields to the current view, that are only relevant if the phone type has been changed .. to I get the work done ... 😉


View solution in original post

9 REPLIES 9

Sorry vemffm even though I kinda like your similies I'll drop out of your thread at this point!


Zod
Giga Guru

Anyone????


Found a WORKAROUND ...


I just added required fields to the current view, that are only relevant if the phone type has been changed .. to I get the work done ... 😉


Sharique Azim
Mega Sage

You can use something like


var url = 'table.do?sysparm_query=id=' + current.sys_id.toString()+'&sysparm_view=default';


action.setRedirectURL(url);


I updated my previous comment.please try the above mentioned.