have a contact 'Maree Test' which having two account associate with it-
1. "Al Joaib Furniture Factory" and
2. " Waiau Pa school "
When i'm getting JSON data from the CRM WebAPI I can see only first account name that is " Al Joaib Furniture Factory". Is there any way to get all the account name for the particular contact ?
*This post is locked for comments
The best option for you would be to download the CRM Rest Builder and build/run the queries/requests on demand. Its easy to use.
Actually, it's the same query Ravi posted..
If you want all contacts which have parent customer set to a specific account, here is the query:
.../api/data/v8.2/contacts?$select=firstname&$filter=parentcustomerid_account/accountid%20eq%20475B158C-541C-E511-80D3-3863BB347BA8
BUT that grid you have highlighted is using some sort of relationship which won't work with this request.
@AlexShlega both would be fine. I am not able to query both.
All contacts under an account
or
All accounts under a contact.
Thank You
Joy
this should work
---
https:// <your org>/api/data/v8.2/contacts?$filter=_parentcustomerid_value%20eq%2083D1423A-0E63-E711-8146-E0071B684991
Do you need all contacts or all accounts(as per the question in the title of this thread)??
@RaviKashyap I can query primaryContact from web api, But I need to query all the contacts under an account not only primaryContact
Can you please let me know, how to query those contacts through web api.
You could refer this request, you need to change the '_primarycontactid_value' with your field name
https:// <your org>/api/data/v8.2/accounts?$filter=_primarycontactid_value%20eq%2083D1423A-0E63-E711-8146-E0071B684991
I need to pull all contacts that are associated with an account through CRM Web api ?
Right now I'm able to pull only primaryContact of an account, but I want to pull the contacts that are associated with an account.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156