You need to sign in to do that
Don't have an account?

Enforcing Referential Integrity for Custom Objects
(Newbie alert...)
I want to define a new custom object called "Bug". Conceptually, there would be a one-to-many relationship between Bug and Cases, as a single Bug could be at the root of many different Accounts reporting the same problem.
Presumably, I would need to add a custom field of BugId to the Case object. However, I obviously want to enforce referential Integrity. Does Salesforce or sforece provide a method of enforcing referential integrity automatically?
My experience with manually enforcing referntial integrity via apllicative code has been dismal...
Any ideas?
TIA
Lavie
Message Edited by adamg on 02-26-2004 10:54 AM
Been staying tune for almost 9 years now :o) Any news?
What it can not do:
- When updating the reference ID with incorrect ID thus breaking the Data integrity, Salesforce doesn't have a way to check this. (But, a manual process could be created to identify such integrity problem, a huge task if performed on each relationship.)
What it can do:
- Making relationship mandatory (lookup relationship)
- Enforcing deletion of relationship before Foreigh Record (Parent Record) could be deleted.
These could be tried:
- Since each Object has a unique prefix for Objid, a custom Apex code could check for validation and existence of a valid record.