Readonly
NameProtected
_attributeProtected
_customPrivate
viewGets the entityType of the first lookup value
Gets the formatted value of the first lookup value
Gets the id of the first lookup value
Gets the value.
The value.
A collection of all the controls on the form that interface with this attribute.
Adds a custom view to filter the lookup using FetchXML Only works for one table at a time, cannot add views for multiple tables at the same time
The complete FetchXML query including filtering conditions
The LookupField instance for method chaining
Displays an error or recommendation notification for a control, and lets you specify actions to execute based on the notification.
Optional
actions: Xrm.Controls.ControlNotificationAction[]Adds a handler or an array of handlers to be called when the attribute's value is changed.
The function reference or an array of function references.
Adds an additional custom filter to the lookup, with the "AND" filter operator.
Optional
entityLogicalName: string(Optional) The logical name of the entity.
If entityLogicalName is not specified, the filter will be applied to all entities valid for the Lookup control.
Example filter: <filter type="and">
<condition attribute="address1_city" operator="eq" value="Redmond" />
</filter>
(Optional) The logical name of the entity.
(Optional) The logical name of the primary key.
Specifies the FetchXML used to filter.
Use addCustomView instead, which provides more flexible filtering capabilities and better performance Adds an additional custom filter to the lookup, with the "AND" filter operator.
If entityLogicalName is not specified, the filter will be applied to all entities valid for the Lookup control.
Example fetchXml: <fetch>
<entity name="contact">
<filter>
<condition attribute="address1_city" operator="eq" value="Redmond" />
</filter>
</entity>
</fetch>
Removes all filters set on the current lookup attribute by using addPreFilterToLookup or addPreFilterToLookupAdvanced
Private
extractFire all "on change" event handlers.
Private
generateGets attribute type.
The attribute's type name.
Values returned are:
Gets the attribute format.
The format of the attribute.
Values returned are:
Gets the current level of requirement for the attribute.
The required level, as either "none", "required", or "recommended"
Gets current submit mode for the attribute.
The submit mode, as either "always", "never", or "dirty"
The default value is "dirty"
Clears the notification identified by uniqueId.
(Optional) Unique identifier.
true if it succeeds, false if it fails.
If the uniqueId parameter is not used, the current notification shown will be removed.
Removes the handler from the "on change" event.
The handler.
Retrieves an entity record.
(Optional) OData system query options, $select and $expand, to retrieve your data.
On success, returns a promise containing a JSON object with the retrieved attributes and their values.
options example:
options: $select=name&$expand=primarycontactid($select=contactid,fullname)
Sets the state of the control to either enabled, or disabled.
true to disable, false to enable.
Sets a lookup with a lookup from the retrieved record.
var contact = await fields.Contact.retrieve('?$select=_parentcustomerid_value');
fields.Account.setLookupFromRetrieve('_parentcustomerid_value', contact);
//Alternate
fields.Account.setLookupFromRetrieve('parentcustomerid', contact);
Sets the value of a lookup
Guid of the record
logicalname of the entity
formatted value
if true, adds value to the array instead of replacing it
Sets a control-local notification message.
The message.
Unique identifier.
true if it succeeds, false if it fails.
When this method is used on Microsoft Dynamics CRM for tablets a red "X" icon appears next to the control. Tapping on the icon will display the message.
Sets the required level.
The requirement level, as either false for "none" or true for "required"
Sets the required level.
The requirement level, as either "none", "required", or "recommended"
Sets the submit mode.
The submit mode, as either "always", "never", or "dirty".
Sets the visibility state.
true to show, false to hide.
Generated using TypeDoc
Interface a Lookup attribute.
See
Attribute