Mark as Parent Pointer
Resco platform recognizes several well-known parent-child relationships between entities (such as quote vs quotedetail or resco_questionnaire vs resco_question). If you need to bind other entities this way, use the Mark as Parent Pointer setting:
- Edit an app project in Woodford.
- Select the child entity.
- Select lookup property that should point to the parent.
- On the Properties pane, enable Mark as Parent Pointer.
- Make sure that the lookup targets allow a single entity - our parent entity.
Implications
Parent-child relationships are used at various places in the app, usually to ensure that both parent and child records are available (all child records for each parent, no orphaned child records, etc.).
The most prominent impact is on synchronization:
- In the entity download phase of sync, to apply the parent entity's sync filter also for child entity records. I.e., only download child records if their parent records are also downloaded.
- When uploading local changes during synchronization to establish the order of entities. (Child entities are uploaded after parent entities.)
- (Dynamics only) This also concerns sync upload: Status changes for parent records are updated only after all associated child records are uploaded.
- Sync cleanup deletes orphaned child records, i.e., child records whose parent record does not exist. (This includes records that would be deleted by cascading delete.)
Then there is an impact on the delete operation, provided you allow cascading delete in project configuration and enable Delete with Parent for the entity:
- When deleting parent entity records, all their child records are deleted as well. (If cascading delete is not allowed, you have to rely on sync cleanup.)
Finally, there is one Salesforce-specific impact, aimed at data download optimization:
- (Salesforce only) Check Mark as Parent Pointer for sf_attachment.parentid property to download only attachments belonging to records that are available offline. Use this “trick” when you see that sync clears a lot of sf_attachment records, which were just downloaded.
Missing parent pointer flag
For the most common Power Platform/Dynamics child tables, Woodford automatically enables the Mark as Parent Pointer option. For less-known and custom tables, Woodford administrator has to enable the option manually. If you don't enable it, you can observe one or more of the following problems:
- Sync upload errors for orphaned child records
- The user has created a parent record and a few child records in the app. Later, the user deleted the parent record. Because of the missing parent-child relationship, the child records remained orphaned. This manifested during sync as upload errors. Deleting local data was an immediate fix for the affected user, but letting Resco Mobile CRM know that there's a parent-child relationship between the tables is the permanent fix.
- Child records not available
- Woodford admin enabled two tables in the app project, but did not set up the parent-child relationship in Woodford. Resco Mobile CRM did not download any child records. Why? In Power Platform/Dynamics, child table permissions are inherited from the parent table. If Resco is unaware of the parent-child relation, the child table has no permissions (including Read). Therefore, no records can be downloaded during sync.