PAQed with no points refunded (of 500)
Computer101
EE Admin
Main Topics
Browse All TopicsHello everyone,
I am trying to find how I can get values from an entity. I have a custom entity called location. It contains City, Province and country fields. I then add this to the contact form so that I can pick the city from the lookup. I can get the value for the city because it is the value that populates the form field but I want to get the related province and country as well.
this code gets the entity name, guid, value etc. but I can't seem to get the other values. Help Please....
var lookupItem = new Array;
// This will get the lookup for the attribute primarycontactid on the Account form.
lookupItem = crmForm.all.dvn_cityid.Dat
// If there is data in the field, show it in a series of alerts.
if (lookupItem && lookupItem[0] != null)
{
// The text value of the lookup.
alert(lookupItem[0].name);
// The entity type name.
alert(lookupItem[0].typena
// The GUID of the lookup.
alert(lookupItem[0].id);
// The entity type code of the lookup: 1=account, 2= contact.
alert(lookupItem[0].type);
}
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: DodgsterPosted on 2006-12-19 at 08:49:32ID: 18166965
You can't get the other values from the city / entity name/ guid etc directly through javascript. If you want to do it this way you need to access the CRM Database through a web service call in javascript, although this is not completely straightforward. You can then use the entity guid to retrieve the relevant row in the database