Observing referential integrity
The architecture implemented in Sage CRM 7.0 and later facilitates the Interactive Dashboard. To allow the persistence of the Meta Data Model within this architecture, make sure you observe strict referential integrity within Sage CRM metadata tables.
This means you must correctly order the code in components in the Sage CRM Script (.es) file. For example, you can't add a view if the table the view is based on hasn't already been added.
The following is a list of custom table dependencies:
- Custom_Edits - (Custom_Tables)
- Custom_Views - (Custom_Tables)
- Custom_ScreenObjects - (Custom_Tables, Custom_Views[optional])
- Custom_Lists - (Custom_ScreenObjects, Custom_Edits)
- Custom_ContainerItems - (Custom_ScreenObjects x2)
- Custom_Tabs - (Custom_ScreenObjects)
- Custom_Screens - (Custom_ScreenObjects, Custom_Edits)
- FieldSecurity - (Custom_Edits)
- UserSettings - (Users)
- TerritoryPermissions - (Custom_Tables ,Users, TerritoryProfiles, Territories)
- Channel_Link - (Users, Channel)
- Users - (Channel, TerritoryProfiles, Territories)
You cannot use the AddCustom_Data or RunSQL method to update the tables listed above, as the foreign keys are not set automatically. Use the table appropriate method instead. For example, to update Custom_Edits use AddCustom_Edits.