Salesforce: Can Lookup relationship field be required? Developer Certification Handbook 2012 by Siddhesh Kabe says that “Lookup cannot be made universally required. Use Master-Detail”. However, looks like this book was released before Summer ’12 when Lookup were made available for “Required” option.

Proof link:

Summer ’12 Platform Release 
New Lookup Relationship Options

Starting in Summer ‘12, you have the option to make a lookup field required (with previous releases, lookup fields were always optional). When a lookup field is optional, you can specify one of three actions to take place on dependent lookup fields when someone deletes a referenced lookup record:

  • Clear the value of this field: This is the default option, available with previous releases. Setting a lookup field to null is appropriate when the field does not have to contain a value.
  • Don’t allow deletion of the lookup record that’s part of a lookup relationship: This new option restricts the deletion of a lookup record that has dependencies, such as a workflow rule built on the relationship.
  • Delete this record also: This new option cascades the deletion of a referenced lookup record to dependent records. It is available only for lookup fields in a custom object; however, the lookup field can reference either a standard or custom object. Choose this option for tightly-coupled record relationships when you want to completely delete related data in one operation.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s