Xrm. Page. Data. entity properties and Methods
Xrm. Page. Data. entity attributes and Methods
Attributes
The collection of attributes for the entity.
Set of entity attributes
Getdataxml
Returns a string representing the XML that will be sent to the server when the record is saved
When a record is saved, the XML data to be sent to the server is returned.
Getentityname
Returns a string representing the logical name of the entity for the record
Returns the logical name of the entity of the string type.
GETID
Returns a string representing the guid id value for the record
Returns the string type and the guid of the current record.
Getisdirty
Returns a Boolean value that indicates if any fields in the form have been modified
Return bool type. If any field on the form changes, return bool
Onsave
Use the addonsave and removeonsave methods to add or remove event handlers to the Save event
When the addonsave and removeonsave events are used, perform the operation
Getprimaryattributevalue
Gets a string for the value of the primary attribute of the Entity
Returns the string type, the name of the main field of the object.
Save
Saves the record with the options to close the form or open a new form after the SAVE is completed
Save the record. You can choose to close the form and open the new record.
Lookup control methods and events
Methods and events for searching Fields
Xrm. Page. getcontrol (ARG). addcustomfilter (filter, entitylogicaname)
Use add additional filters to the results displayed in the lookup.
Each filter will be combined with any previously added filters as an 'and 'condition.
Add query conditions. The added conditions are connected with and.
Example:
<Filter type = "and">
<Condition attribute = "address1_city" operator = "EQ" value = "Redmond"/>
</Filter>
Xrm. Page. getcontrol (ARG). addcustomview (viewid, entityname, viewdisplayname, fetchxml, layoutxml, isdefault)
Adds a new view for the lookup dialog box
Add a new Query Form
Xrm. Page. getcontrol (ARG). getdefaview view ()
Returns the id value of the default lookup dialog View
Returns the guid of the default view.
Xrm. Page. getcontrol (ARG). setdefaultview (viewguid)
Sets the default view for the lookup control Dialog
Set the default view of the lookup Control
Xrm. Page. getcontrol (ARG). addpresearch (handler)
Use this method to apply changes to lookups based on values current just as the user is about to view results for the Lookup
Method before adding an Event Query
Xrm. Page. getcontrol (ARG). removepresearch (handler)
Use this method to remove event handler functions that have previusly been set for the presearch event
Delete operations added with presearch
Xrm. Page. Data. entity properties and Methods