Skip to content
+1-888-319-3663

COMMUNITY FORUM

updating all child records with only a parent record passed

Aaron asked 6 years ago
What’s the eOne pattern for iterating child records?
I am integrating to Dynamics CRM 2011 and I would like to pass a parent record to end (e.g. Account) and eOne looks up and update all child records (e.g. opportunities), specifically to set them as inactive.
My Map works correctly for the first child record, but does not update any subsequent child records. I believe the problem is because where there is only 1 Parent record I am passing (an Account ID), there as N child records and my map is not iterating the child records, it is only processing 1 time (for the parent) and N-1 child records are going unprocessed.
My process has been to:

  • create a map for the Child Entity type

  • create an Entity Lookup for the Parent that matches my CRM entity’s AccountID passed from the integration

  • create an Entity Lookup for the Child that matches my CRM entity’s RelatedAccountID passed from the Entity Lookup for the Parent (above set)

  • set the Entity Moniker value (of type EntityReference) to an Entity Lookup for the Child (above set)


As I said, this process works, but only for the first child entity, no matter how many times I pass the value (I believe each time it is deactivating the same child entity, which would make sense).
 
Answers
Lorren Zemke answered 6 years ago
Aaron,
The child records would have to be a part of the data source. Depending on what your initial source is you could use the Multi-Data source which takes your original source and links it to the CRM Child Records as the other source.
Then handle the grouping within SmartConnect to update the header entity and not group on the child entity node so it processes each one of those

If you would like to submit an answer or comment, please sign in to the eOne portal.