Lookup relationship options
When you create a lookup field on an object, you can choose whether the lookup field is required or optional. If the lookup field is optional, you can specify one of three behaviors to occur if the lookup record is deleted:- Clear the value of this field: This is a default option and is a good choice when the field does not have to contain a value from the associated lookup record.
- Don’t allow deletion of the lookup record that’s part of a lookup relationship: This option prevents the lookup record from being deleted and is a good choice for restricting deletions if you have dependencies, such as workflow rules, based on the lookup relationship.
- Delete this record also: This option works similar to the master-detail relationship and deletes the record whenever the lookup record is deleted. Choosing this option can result in a cascade-delete. A cascade-delete bypasses security and sharing settings, which means users can delete records when the target lookup record is deleted even if they don’t have access to the records. To prevent records from being accidentally deleted, cascade-delete is disabled by default. Contact Salesforce to get the cascade-delete option enabled for your organization.
This option is only available within custom objects and is not available for standard objects. However, the lookup field object can be either a standard or custom object.
Master-detail relationship options
- Allow reparenting option: By default, records in master-detail relationships cannot be reparented. However, you can allow child records in a master-detail relationship to be reparented to a different parent by selecting Allow reparenting option in the master-detail relationship definition.
Other links for references:
- One to one relationship: http://biswajeetsamal.com/blog/create-one-to-one-relationship-in-salesforce/
- Imitate rollup summary in a lookup relationship: http://biswajeetsamal.com/blog/rollup-summary-trigger-for-a-lookup-relationship/
- Difference between hierarchical relationship and self relationship: https://success.salesforce.com/answers?id=90630000000CuhyAAC
0 comments:
Post a Comment