Javascript to retrieve associated entity record count
-
giovedì 7 giugno 2012 21:23
Hi all,
Please provide javascript to count number of records associated with the entity. I have Account entity and custom entity service. Account is having 1:n relationship with service. Its relatioship name is new_account_service.
I want to calculate number of service records created for one account record. Can you please provide javascript/ soap envelope to retrieve such associated entity record count
Regards,
-Anand Wani
Tutte le risposte
-
giovedì 7 giugno 2012 22:00
Perform a RetrieveMultipleRequest on the service entity where AccountId = Guid of your account
In stead of using new_account_service you should use the id field created for that relationship.Example: http://mileyja.blogspot.be/2011/03/crm-2011-retrievemultiple-calls-in.html
- Proposto come risposta Sven Vanoirbeek giovedì 7 giugno 2012 22:00
- Contrassegnato come risposta Andrii ButenkoMVP, Moderator domenica 17 giugno 2012 07:55
-
venerdì 8 giugno 2012 06:26
You may check out the following thread in which the requirement as the same as yours.
http://social.microsoft.com/Forums/en/crm/thread/558983ef-66f9-44b0-b601-a2bc63fc929b
- Proposto come risposta Kyaw Kyaw Tun venerdì 8 giugno 2012 06:32
- Contrassegnato come risposta Andrii ButenkoMVP, Moderator domenica 17 giugno 2012 07:55