Set Default View Using View Rule

Jagadeesh R1
Tera Expert

Hello Team,

     I have a requirement to set a business service form to default for users with a role. I have to set it using View rule by using the advanced script. The problem I have encountered is unlike all the views ,Default view doesn't have a name. It is showing empty. How can we set the view in the script for default view? Will this be possible by using formats like view="" or view=null or even view=undefined?

This can be possible from module link view, but I am trying to find whether we can set the Default view from script in view rule

 

Regards,

Jagadeesh

 

8 REPLIES 8

Harsh Vardhan
Giga Patron

did you try to pass the view name as "default" in your view rule

Hello, 

    Thanks for the reply, I have tested by passing the default in the view rule. But the issue is that there are two views will be available in the name of Default View. One will be OOB and other will be the one we mentioned.

 

 Please refer to below link 

https://hi.service-now.com/kb_view.do?sysparm_article=KB0690775

 

Regards,

Jagadeesh

Munender Singh
Mega Sage

Hi,

It is better to use a client script on load to set the field value and you can select the view over there also.Uncheck the 'global' checkbox and then select the view for which you want to apply this clien tscript.

 

Regards,

Munender

Harsh Vardhan
Giga Patron

Example: i tried to open my script include form in default view for all users,

so i had created one view rule and mention the view name as default. cleared the cached and then it is showing in default view

find_real_file.png

 

find_real_file.png