About the Shared Embedded Owner Role
Each embedded record that is shared has an owner. This is the record from which a user initially creates the shared record. For example, an address that is shared among a company and the people at that company is owned by the company. For that particular Addresses record, the OwnerEntity would be "Companies" and the -OwnerRecordID would be the ID of the top-level company's record. The embedded link field for the Owner entity defines the sharing and update logic for all of the other container records that share the same embedded record.
The embedded link field for the owner entity has the following settings, as illustrated in the figure below, which shows the AddressID field in the Companies entity:
- Linked Entity: The name of the embedded entity.
- Linked Entity Field: Typically, the ID field in the embedded entity.
- Link Type: Embedded
- Mode: Dynamic. This setting adds a Dynamic Sharing tab to the Fields record.
- Dynamic Flowdown Proc: This link box specifies the stored procedure which defines the logic for updating the dynamic non-owner shared links specified in the Dynamic Sharing sub-type -listing.
- A developer needs to write a stored procedure and add it as a Database Objects record. This stored procedure should define how updates made to the embedded record at the owner level are propagated to other dynamic non-owner links. See the stored procedures that are linked to the Companies entity's AddressID field and the Organizations entity's AddressID field for examples.
- This stored procedure does not establish the sharing relationship between an owner and non-owner container records, it only maintains the relationship and performs updates as needed. To perform the initial flow-down (for example, to associate a company's address when you add a company to a Persons form), you typically specify this logic in an entity plug-in object for the non-owner entity.
- Dynamic Sharing Relationships Sub-Type: This sub-type control stores the list of entities and their embedded links that can share an embedded record with this owner entity as a non-owner. Each sub-type record stores the Related Entity name, the Related Entity Field (this is the embedded link in the Related Entity that links to the shared embedded object), and a Dynamic Flowdown Filter (which you can use to filter the set of records to which this shared embedded object relationship applies). For the Companies entity's AddressID field, one type of non-owner records is updated dynamically (the specific update logic is stored in the Dynamic Flowdown stored procedure):
- Persons/AddressID: This corresponds to the business address for Persons who are associated with the company.
- Persons/AddressID: This corresponds to the business address for Persons who are associated with the company.
Copyright © 2014-2017 Aptify - Confidential and Proprietary