Question

How to conditionally restrict the delete option of a detail?

Hi Team,

I have to disable the delete option from a detail if the Status field's value is 'Closed'. I added the following code in the detail schema but still it is not working as expected.

Kindly help me out in doing this.

Thanks in advance!

Like 0

Like

5 comments

Hi Poorva,

 

Please clarify if the closed status should be for the detail record or for the main record where the detail is located (main edit page where the detail is placed).

 

Best regards,

Oscar

Hi Oscar Dylan,

Thanks for the reply.

I am having a section and there another section is used as detail. And the status field is located in the section & not in the detail.

Poorva Sharma,

 

There is no need to use additional development to achieve the task desired. Please create a business process that will remove editing rights for detail records for all users once the main record status is "Closed". This is a more appropriate way to implement the functionality needed.

 

Best regards,

Oscar

Oscar's response is the best way to make sure that records can't be deleted once closed. However, if you'd like to know how to do this via programming, these articles show how to do this: 

 

This article shows how to remove those functions based on the page it's on or columns it's connected to the page with:

https://customerfx.com/article/conditionally-making-a-detail-read-only-…

This article shows how to remove those functions based on values of columns of the selected record in the detail:

https://customerfx.com/article/conditionally-allowing-delete-copy-or-ed…

Ryan

Ryan Farley,

If we want to make detail read-only on the basis of section column as I mentioned above & if section status is Closed then I want to remove Add, Edit, Copy and Delete actions from the detail. I am attaching snapshots of section & detail for your reference.

Here Agreements is the section & Funds Flow is the detail on it.

Best Regards,

Poorva Sharma

Show all comments