How to restrict "Insert New Row" on embedded list based on certain condition

KS7
Kilo Contributor

Hi All,

I have a requirement where I wanted to restrict "Insert new row" on an embedded list based on a condition.

So, if the Phase = "Implementation", I wanted to restrict the user to enter any record through the embedded list. I have tried restricting it using "Omit Insert row condition" but it's not working

find_real_file.png

Please refer below screenshot for the form details

 

 

 

4 REPLIES 4

Chander Bhusha1
Tera Guru

Hi Ks,

You cannot do it directly with the list control option you have to do it with the help of aCLfor that.

This article will help you : as this is having same requirement.

https://community.servicenow.com/community?id=community_question&sys_id=9c4287addb98dbc01dcaf3231f96...

 

Mark helpful and correct if it helps.

Thanks,

CB

Ajaykumar1
Tera Guru

Hi Try removing "answer" from line number 9.

OR try below

Securing Records in an Embedded List

To apply security to the records in embedded lists, limit editing and deleting records in embedded lists to specific roles.

  1. Navigate to System Security > Access Control.
  2. Open the Write or Delete record for the appropriate table.
  3. In the Requires Role section of the form add the roles that have write or delete permission for that table.
  4. Save the changes.
    When records from the associated table appear in an embedded list, the edit and delete options will be available only to users with the specified roles.

 

Regards,
Ajay

Vijay Talupula
Tera Guru
Tera Guru

When I tried the create ACL with condition -- parent.phase is so and so -- as the parent field will hold the sys_id of parent table record,

 

1) It is not working for the first time creation of the record through embedded list (from parent form).

2) It is working if the parent has at least one child record in the embedded list. But with this scenario, it is impacting the users while they create first record through embedded list.

I also tried using the ACL script block but no luck :(.

 

Please advise if any body has any tips on this to take this forward?

Joe72
Tera Contributor

That field doesn't seem to be evaluated - at least not in a scoped app. What I do is create a sys_relationship with the same filter as the dot-walked OOB list. I find that that allows for more control, including removing the "insert new row" row.