Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

How do I get a contact's account with Web API?

$
0
0

I can get an account's contacts easily enough, with 

accounts?$select=name&$expand=contact_customer_accounts($select=contactid)

but how can I do the reverse? I can't seem to figure it out. I can do:

contacts?$select=firstname,lastname,emailaddress1,telephone1&$expand=account_primary_contact($select=name)

but this will only give me account info if the contact is a primary contact of that account. How do I get just the related account?

I would guess it's this, but this doesn't work:

contacts?$select=firstname,lastname,emailaddress1,telephone1&$expand=accounts($select=name)

Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images