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

sunilsafare
Mega Guru

You can modify New UI action to redirect to required form view


action.setRedirectURL('incident.do?sys_id=-1&sysparm_view=YOURVIEWNAME');


where i have to mention this script line in UI Action -NEW


Check if your UI action is defined on Incident table or global. If it is global one create a new UI action with name as "New" and add the below line of code.



action.setRedirectURL('incident.do?sys_id=-1&sysparm_view=Default');



If it is on incident table then paste the code here


Hi   Sunil



i have replaced your script.


find_real_file.png



But it is not working....!