- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2021 10:07 PM
I have tried the following script with no success.
I want to hide the field in the attachment that is circled in red.
Is there something wrong in the way I'm writing it?
function onLoad() {
if (g_user.hasRoleExactly('x_540069_cmdb.test_roll1')) {
g_form.setVisible('kisyu_name', true);
g_form.setVisible('gyousya_name', true);
}
else {
g_form.setVisible('kisyu_name', false);
g_form.setVisible('gyousya_name', false);
}
}
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
-
Team Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2021 10:26 PM
I see you have added fields from one your reference field by dot walking.
To manage dot walked fields use below logic:
function onLoad() {
if (g_user.hasRoleExactly('x_540069_cmdb.test_roll1')) {
g_form.setVisible('kisyu_name', true);
g_form.setVisible('kisyu_name.maker_id.gyousya_name', true);
}
else {
g_form.setVisible('kisyu_name', false);
g_form.setVisible('kisyu_name.maker_id.gyousya_name', false);
}
always use field name in client script and if it is dot walked field then use highlighted part:
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2021 01:41 AM
I'm sorry every time.
The Field watcher showed only a 3-line ACL.
I am not sure what these three lines represent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2021 07:31 PM
Hi,
It was successful.
It seems that the definition of the field name was wrong.
I made a rudimentary oversight, sorry.
However, it was very helpful and I learned a lot from your detailed instructions!
Thank you very much.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2021 10:54 PM
You are welcome!
Stay Safe and Happy Learning 🙂
Anil Lande
Thanks
Anil Lande