편집

다음을 통해 공유


getPageContext (Client API reference)

Gets the page context as an object representing the page.

Note

This method is supported only on Unified Interface.

Syntax

Xrm.Utility.getPageContext();

Returns

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

Entity form

Name Type Description
pageType String The current page type. The value returned is entityrecord.
entityName String Logical name of the table currently displayed.
entityId String ID of the table record currently displayed in the form.
createFromEntity Lookup The parent record that provides default values based on mapped column values. The lookup object has the following String properties: entityType, id, and name.
formId String ID of the currently displayed form.

Entity list

Name Type Description
pageType String The current page type. The value returned is entitylist.
entityName String Logical name of the table currently displayed.
viewId String ID of the view currently displayed.
viewType String Type of the view currently displayed. Possible values are savedquery or userquery.

Note

Only the pageType and entityName parameters will return values every time; all other parameters will return values only if specified by the logic that opened the page.

Xrm.Utility