why Default view is not displaying in new record -incident record

chanikya
Tera Guru

using with OnChange script -in a new record if   i have changed state value from NEW to CLOSED then form view was changed to ''state_closed''view   ----working fine, after updated   record ,

if we see in list of records       view is displaying as like "state_closed"

when i clicked on NEW button then "state_closed " view is reflecting on NEW record , As per new record view should be Default view

i want to display Default view when i click on NEW button

1 ACCEPTED SOLUTION

Try this view rule. Its working in my personal instance.



find_real_file.png


View solution in original post

17 REPLIES 17

Try with action.setRedirectURL('incident.do?sys_id=-1&sysparm_view=default'); OR action.setRedirectURL('incident.do?sys_id=-1&sysparm_view=');


As you suggested i have tried in two ways with your script.



but not working,



here i am attaching screenshot i hope will helpful





My view Rules:



find_real_file.png



find_real_file.png



find_real_file.png










find_real_file.png



find_real_file.png


Try this view rule. Its working in my personal instance.



find_real_file.png


hi Sunil,



Shall i have to keep your UI action script under NEW button or shall i remove it???


Remove the script if the above view rule is working