Table of Contents

Codeunit "Page Action Provider"

ID 2915
Namespace: System.Integration

Exposes functionality that gets relevant page actions for a selected page. This codeunit is exposed as a webservice and hence all functions are available through OData calls.

Properties

Name Value
Access Public
InherentEntitlements X
InherentPermissions X

Methods

GetCurrentRoleCenterHomeItems

Gets home items for user's current role center.

procedure GetCurrentRoleCenterHomeItems(IncludeViews: Boolean): Text

Parameters

Name Type Description
IncludeViews Boolean

Specifies whether views for home items should be included.

Returns

Type Description
Text

Text value for the home items in JSON format.

Examples

"version": "1.0", "roleCenterId": 9022, "items": [ { "caption": "Customers", "views": [ { "caption": "balance", "url": "https://businesscentral.dynamics.com/?company=CRONUS%20International%20Ltd.&page=22&view=aa49406f-6f68-4565-b857-496faa0e77aa_balance48453&page=22&filter=Customer.%27Balance%20(LCY)%27%20IS%20%27>200%27" } ], "url": "https://businesscentral.dynamics.com/?company=CRONUS%20International%20Ltd.&page=22" }, { "caption": "Vendors", "url": "https://businesscentral.dynamics.com/?company=CRONUS%20International%20Ltd.&page=27" }, { "caption": "Items", "url": "https://businesscentral.dynamics.com/?company=CRONUS%20International%20Ltd.&page=31" }, { "caption": "Account Schedules", "url": "https://businesscentral.dynamics.com/?company=CRONUS%20International%20Ltd.&page=103" } ]

In case of an error: { "version":"1.0", "roleCenterId": 9022, "error":[ "code":"UnableToGetRoleCenter" "message":"Cannot get current role center for the user." ] }

GetVersion

Gets the current version of the Page Action Provider.

procedure GetVersion(): Text[30]

Returns

Type Description
Text[30]

Text value for the current version of Page Action Provider.

Events

OnAfterGetPageActions

Allows changing which items are returned just before sending the response.

[IntegrationEvent(False,False)]
internal procedure OnAfterGetPageActions(PageId: Integer, IncludeViews: Boolean, var ItemsJsonArray: JsonArray)

Parameters

Name Type Description
PageId Integer

The ID of the page for which to retrieve page action data.

IncludeViews Boolean

The ID of the page for which to retrieve page action data.

ItemsJsonArray JsonArray

Allows overriding which items are being returned.

See also