1

On the object "A" I do have an existing lookup field to the very same object "A". In the "Lookup Options" on this field the setting "What to do if the lookup record is deleted?" is set to "Clear the value of this field". It appears that the setting cannot be changed, it does not appear when clicking on the Edit button. Is it a salesforce limitation on the lookup fields with self-relationship?

1 Answer 1

1

The 'What to do if the lookup record is deleted?' section is absent from the configuration of a lookup field if the object that you’re looking up to is the same object that the lookup field is on.

For example, if there’s a custom object called Object_A and a lookup field on that object that looks up to Object_A.

The reason this is by design is to prevent a cascade deletion that could delete all or most of the Object_A records. For example, in a circular chain of record relationships (Record_A > Record_B > Record_C > Record_A), if one of them is deleted, the entire chain will also be deleted if the 'Delete this record' option were selected.

Since the ability to select any of the three options is removed in this scenario, the behavior upon deleting a record that is part of a self-referential is the default value of 'Clear the value of this field.'

https://help.salesforce.com/s/articleView?id=000383277&type=1

1
  • 2
    Link-only answers are discouraged and may be deleted. (See: Why and how are some answers deleted?) Please edit your answer to add more information. (From How do I write a good answer?: "...please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link....")
    – Moonpie
    Dec 5, 2022 at 12:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .