Xrm. Page. Data. entity properties and Methods

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.