Interface for the form's record context, formContext.data.entity

Hierarchy

Properties

The collection of attributes for the record.

Methods

  • Adds a handler to be called when the record is saved.

    Parameters

    Returns void

  • Gets an serialized-XML string representing data that will be passed to the server upon saving the record.

    Returns string

    The XML in string format.

    Remarks

    This function does not work with Microsoft Dynamics CRM for tablets.

    Example

    "<account><name>Contoso</name><accountnumber>55555</accountnumber><telephone2>425
    555-1234</telephone2></account>".
  • Gets entity's logical name.

    Returns string

    The logical name.

  • Gets the record's unique identifier.

    Returns string

    The identifier, in Guid format.

    Example

    Example: "{825CB223-A651-DF11-AA8B-00155DBA3804}".
    
  • Gets a boolean value indicating whether the record has unsaved changes.

    Returns boolean

    true if there are unsaved changes, otherwise false.

  • Gets the record's primary attribute value.

    Returns string

    The primary attribute value.

    Remarks

    The value for this attribute is used when links to the record are displayed.

  • Gets a boolean value indicating whether all of the entity data is valid.

    Returns boolean

    true if all of the entity data is valid; false otherwise.

  • Removes the handler from the "on save" event.

    Parameters

    Returns void

  • Saves the record synchronously with the options to close the form or open a new form after the save is completed.

    Returns void

    Remarks

    When using quick create forms in the web application the saveandnew option is not applied. It will always work as if saveandclose were used. Quick create forms in Microsoft Dynamics CRM for tablets will apply the saveandnew behavior.

    Deprecated

    Deprecated in v9.1; This method is deprecated and we recommend to use the formContext.data.save method.

  • Saves the record with the given save mode.

    Parameters

    • Optional saveMode: Xrm.EntitySaveMode

      (Optional) the save mode to save, as either "saveandclose" or "saveandnew". If no parameter is included in the method, the record will simply be saved.

    Returns void

Generated using TypeDoc