Question

When I select some Contact in a lookup field, I want to get his nickname (for example). How to do this using Javascript?

I already have GUID of that Contact.

Edit: On Case entity I have lookup field with Contact type. Every entity is default. Now, when I choose some contact on Case entity, how can I get Contact's Nickname?

Was it helpful?

Solution

I think you are looking for REST endpoints to go ask CRM for the Contact's Nickname via javascript. This question has an answer by Anwar which explains how to use the REST endpoints to get data. In your case, notice how he is requesting the conact:

odataUri = odataUri + '/ContactSet?$select=ContactId,FullName&$filter=

you could get the nickname in a similar fashion:

odataUri = odataUri + '/ContactSet?$select=ContactId,NickName&$filter=
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top