Interface for the Xrm.Utility API

Hierarchy

  • Utility

Methods

  • Displays an alert dialog, with an "OK" button.

    Parameters

    • message: string

      The message.

    • onCloseCallback: (() => void)

      The "OK" callback.

        • (): void
        • Returns void

    Returns void

    Deprecated

    Deprecated in v9. Use openAlertDialog instead.

    See

    External Link: Deprecated Client APIs

  • Displays a confirmation dialog, with "OK" and "Cancel" buttons.

    Parameters

    • message: string

      The message.

    • yesCloseCallback: (() => void)

      The "OK" callback.

        • (): void
        • Returns void

    • noCloseCallback: (() => void)

      The "Cancel" callback.

        • (): void
        • Returns void

    Returns void

    Deprecated

    Deprecated in v9. Use openConfirmDialog instead.

    See

    External Link: Deprecated Client APIs

  • Returns the valid state transitions for the specified entity type and state code.

    Parameters

    • entityName: string

      The logical name of the entity.

    • stateCode: number

      The state code to find out the allowed status transition values.

    Returns PromiseLike<number[]>

    Returns an object with .then() function. The parameter to the delegate is an array of numbers representing the valid status transitions.

  • Returns the name of the DOM attribute expected by the Learning Path (guided help) Content Designer for identifying UI controls in the model-driven apps forms. An attribute by this name must be added to the UI element that needs to be exposed to Learning Path (guided help).

    Returns string

    DOM attribute expected by the Learning Path (guided help) Content Designer.

  • Gets the page context as an object representing the page.

    Returns PageContext

    The method returns an object with the input property. The input property is an object with the following attributes depending on whether you are currently on the entity form or entity list

  • Returns the localized string for a given key associated with the specified web resource.

    Parameters

    • webResourceName: string

      The name of the web resource.

    • key: string

      The key for the localized string.

    Returns string

    A localized string.

  • Query if 'entityType' is an Activity entity.

    Parameters

    • entityType: string

      Type of the entity.

    Returns boolean

    true if the entity is an Activity, false if not.

    Deprecated

    Deprecated in v9. Use Xrm.Utility.getEntityMetadata(entityName, ["IsActivity"]) instead.

    Remarks

    The isActivityType method is synchronous so it was suitable for ribbon rules. However, the replacement method, getEntityMetadata, is asynchronous, and is not suitable for ribbon rules.

    See

    External Link: Deprecated Client APIs

  • Opens an entity form.

    Parameters

    • name: string

      The entity's logical name.

    • Optional id: string

      (Optional) The unique identifier for the record.

    • Optional parameters: Xrm.Utility.FormOpenParameters

      (Optional) A dictionary object that passes extra query string parameters to the form.

    • Optional windowOptions: WindowOptions

      (Optional) Options for controlling the window.

    Returns void

    Deprecated

    Deprecated in v9. Use openForm instead.

    See

    External Link: Deprecated Client APIs

  • Opens an HTML Web Resource in a new browser window.

    Parameters

    • webResourceName: string

      Name of the HTML web resource. Can be used to pass URL parameters. See Remarks.

    • Optional webResourceData: string

      (Optional) Data to pass into the Web Resource's data parameter. It is advised to use encodeURIcomponent() to encode the value.

    • Optional width: number

      (Optional) The width of the new window.

    • Optional height: number

      (Optional) The height of the new window.

    Returns Window

    A Window reference, containing the opened Web Resource.

    Deprecated

    Deprecated in v9. Use openWebResource instead.

    See

    External Link: Deprecated Client APIs

    Remarks

    This function will not work with Microsoft Dynamics CRM for tablets.
    Valid WebResource URL Parameters:

    • typename
    • type
    • id
    • orgname
    • userlcid
    • data (identical to this method's webResourceData parameter)
    • formid
  • Displays a progress dialog with the specified message. Any subsequent call to this method will update the displayed message in the existing progress dialog with the message specified in the latest method call.

    Parameters

    • message: string

      The message to be displayed in the progress dialog.

    Returns void

Generated using TypeDoc