function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
cw.ax43cw.ax43 

maintaining data integrity

We are currently investigating how to integrate our application with salesforce.com.  One thing we will likely need to do is to extend the Account object with additional information, probably using custom fields.  In addition to extending the Account object we also want to add some of our own objects â¬? These additional objects logically have Account as the parent object.  We have not yet decided if we want to keep these additional objects in our own database (i.e., managed by our own web application) or if we would use custom objects and thus keep the data inside salesforce.com.  Regardless of the approach we take however, we need to ensure the integrity of these additional objects.

Specifically, letâ¬?s consider the case of maintaining referential integrity.  With some objects it makes sense to do cascading deletion when the parent Account is deleted, but for other objects it makes better sense to prevent the parent Account from being deleted.  My question is in two parts:  (a) what is the best way to accomplish this today; and (b) are there any new features being added to sforce (either in the next release or at least on the roadmap) that might make it easier to accomplish such a task in the near future?

 

A couple of features that I can see as being useful for managing data integrity would be:

(1) The ability to define custom objects that have a custom reference to a parent object and additionally the ability to specify whether the child object should be deleted through cascading deletion or whether the deletion of the parent should fail if it has a related child object.

(2) The ability to implement custom â¬?createâ¬?, â¬?updateâ¬?, and â¬?deleteâ¬? operations for objects by POSTing to an external URL rather than having the request directly handled by salesforce.com.  This would provide a way for an external application to execute custom business logic before doing the actual object creation, update, or deletion via the sforce API.  There could be situations where the external application might decide to fail the operation.  In the case of an object being created or updated, the external application might need to implement additional validation for custom fields or it may need to enforce additional constraints between objects.

 

Thanks in advance.