How to Make a Dot-Walked Field Read-Only in an Embedded Related List?

Siddhesh Jadhav
Kilo Sage

Hi All,

I have embedded a related list on the `ast_contract` form. In this related list, there is a field `model_number`, which is dot-walked from another table. I need to make this field read-only, but I am facing challenges:

- I tried using an onLoad Client Script, but I couldn't access the embedded related list and the `model_number` field.
- I attempted to use a UI Policy, but since it's an embedded related list, it's not available under UI Policy Related List Actions.

 

Questions:
1. How can I make the `model_number` field in the related list read-only?
2. Is there a way to control the field behavior through Client Scripts, UI Policies, or any other approach?

Any guidance would be appreciated. Thanks in advance!

11 REPLIES 11

Robert H
Mega Sage

Hello @Siddhesh Jadhav ,

 

Are there any scenarios or forms where list editing that particular "model_number" field shall be allowed?

If not then you could simply create an ACL of type "list_edit" for this field that denies list editing for everyone.

 

Regards,

Robert

quanth
Tera Contributor

Hello!

 

Let's try to use ACL in this case as an embedded list does not work the same way as fields on the form.

 

Prataps135
Mega Sage

Hi @Siddhesh Jadhav,

Navigate to the Dictionary Entry:

Go to System Definition > Dictionary.

Search for the model_number field on the child table (where it's actually stored).

Set the Read-Only attribute to true.

Ensure Access Control Rules (ACLs) Enforce Read-Only:

Go to System Security > Access Control (ACLs).

Create or modify an ACL for the model_number field to ensure it is read-only based on roles.



Thanks and Regards,
Pratap Singh Sisodia
If you found this helpful, please give a thumbs up OR mark it as the solution. Thank you!

Shivalika
Mega Sage

Hello @Siddhesh Jadhav 

 

Below are few ways -

 

  • You need to do dictionary override on this field and add table as your related list and then make it read only. Otherwise it will make it read only also for your parent record. 
  • List edit ACL also you need to run on related list. 
  • You can write below 👇 write ACL on the field with condition as - "current.getRefRecord('parent_field').sys_id != current.sys_id" (to restrict in related lists)

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY