Hi I have a parent entity “Entity A” and it has a one to many relationship with “Entity B”. I have a specific integer field which exists in all instances of the related Entity B that I would like to total in “Entity A”. How would I achieve this through CRM Javascript? I am thinking it needs a loop to grab all instances of Entity B, and then retrieve the value into an array. Any examples?
In short: Entity A needs a field that shows the total of specific value from related entities.
If anyone has an example, I will award bounty.
To answer my own question, I used a retrieveMultiple to do this and pushed the values into the parent entity.