This documentation is archived and is not being maintained.

Regarding

Dynamics
banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

A Regarding field represents a Lookup where the linked record can be any record type that can be presented in the field.

The following properties are available:

Regarding propertiesTypeDescription
{Field}.DataValue For the regarding field type this is an array with a 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 gets 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);

}

See Also

Concepts

Other Resources


© 2010 Microsoft Corporation. All rights reserved.


Show: