Field Type: Customer or Regarding

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.


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.

   // The GUID of the lookup.

   // The entity type name.

   // The entity type code of the lookup: 1=account, 2= contact.
   // This attribute is deprecated. Use typename instead.

© 2007 Microsoft Corporation. All rights reserved.