2

Lookup options include

[✓] Required (Always require a value in this field in order to save a record)

What to do if the lookup record is deleted?

( ) Clear the value of this field. You can't choose this option if you make this field required.

(•) Don't allow deletion of the lookup record that's part of a lookup relationship.

Once a custom lookup field is packaged, can those options be changed in subsequent releases?

If required is removed, package is packaged again, and an upgrade is performed, will the custom lookup field no longer be required in orgs that are using the upgraded package?

1 Answer 1

2

Yes, the lookup field value is no longer required.

Furthermore, the restriction can be reintroduced at a later point. Records that had no values on lookup fields while the restriction was not active do not affect the upgrade, but will need a value during record updates once the restriction becomes active again.

To test, I've created a managed package with the [✓] Required restriction, installed it, and created a parent and a child linking to it.

I've then removed the [ ] Required restriction on the packaging org, repackaged, and upgraded the package on the target org. This removes the restriction on the target org. I've then removed the lookup from a child record to a parent record.

Finally, I've reintroduced the [✓] Required restriction, repackaged and upgraded the package on the target org. This again introduces the restrictions for new changes. The existing records without a lookup are not affected; the upgrade is successful even though there is no value for lookup fields. Any subsequent changes to such objects will not be successful unless the lookup value is also set.

You must log in to answer this question.

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