Export (0) Print
Expand All

Field Type: Customer or Regarding

CRM 1.2
banner art

The following properties are available:

Customer or Regarding properties Type Description
{Field}.DataValue   Specifies an array of lookup objects. For single lookups this is of length of one. DataValue is Null when no value is selected. Set DataValue to Null to make the lookup field blank.

Example

The following code example shows how to use a field of type Regarding.

var lookupItem = new Array;
lookupItem = null;

// This will get the lookup for the attribute regardingobjectid on the Task form.
lookupItem = crmForm.all.regardingobjectid.DataValue;

// If there is data in the field, show it in a series of alerts.
if (lookupItem[0] != null)
{
   // The text value of the lookup.
   alert(lookupItem[0].name);

   // The GUID of the lookup.
   alert(lookupItem[0].id);

   // The entity type name.
   alert(lookupItem[0].typename);

   // The entity type code of the lookup: 1=account, 2= contact.
   // This attribute is deprecated. Use typename instead.
   alert(lookupItem[0].type);
}

© 2007 Microsoft Corporation. All rights reserved.


Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft