Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

custom field editable only for specific groups for remaining readable and it's not hard coded

sulochanate
Kilo Explorer

I am trying to make a specific field editable only for 2 groups. I don't want to hard-code in scripts. so , i created system property to store allowed grp sys id's.  Later i have created didplay BR and Client scripts on load.
After impersonating also not reflecting changes.

please guide me correct solution.

1 REPLY 1

mugi-san
Tera Guru

Hi, @sulochanate .

It is best to avoid using system properties to hold variables whenever possible. However, if there is no other option, after creating the system property value, you can run “cache.do” from the filter navigator. This is expected to delete cashe and reload the configured system property values.

In cases where a Client Script implementation affects the user interface, also consider requesting users to clear their browser cache before opening the page.

 

Notice:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB2029112

 

As you know, whenever possible, avoid hard‑coding values directly into the script. Instead, create the script so that it searches for the target by defining appropriate filter conditions for the required records (leveraging GlideAjax).

 

https://www.servicenow.com/docs/ja-JP/bundle/yokohama-api-reference/page/app-store/dev_portal/API_re...

 

regards.

 

If you found this post helpful, I would appreciate it if you could click the “Good” button or close the case.