Table of Contents

Public JavaScript API for control actions

Creating non-auto generated controls requires markup that contains specific attributes to represent events and actions. When these attributes are used, the Pega 7 Platform routes actions and events through the same infrastructure as the auto-generated controls.

Read More About Action Attributes


The Public JavaScript API allows you to treat custom controls like auto-generated controls in the Pega 7 Platform. The following set of APIs is available for creating custom controls. These are available in pega.api.ui.actions and pega.api.ui.actions.list namespace. In order to use any API, it should be invoked with complete namespace, for example: pega.api.ui.actions.refreshSection(params).



Refresh the current section or a named section. When refreshing a named section all sections with that name on the harness will be refreshed.



Refresh the current harness.



Posts the value of the field to the clipboard when the field is bound to a property.



Set any target property from a source property or a literal constant.



Set any target property from a source property or a literal constant. Supports setting of multiple target properties through a single call.



Run a data transform.



The runActivity() method is used to run activity from script.



Get the data page data from the clipboard in JSON form.



Sets focus on a field identified by the target property.



Launch a local action either as a modal dialog, overlay or by replace the current section.



Add a new item to a grid or a repeating dynamic layout.



Delete the active row in a grid, tree Grid, tree or repeating dynamic layout.



Makes the active row in the grid, tree grid, tree or repeating dynamic layout editable.



Launch a local action in a modal dialog in the context of a list item.



Open a URL in a browser window. The URL can either be a external URL or an internal (same domain) URL navigated through an activity or data transform.



Async API that returns the HTML markup of the section when rendered with the supplied clipboard page reference.



Async API that returns the HTML markup of a section as a JSON string rendered on each item in a list page.



Launch a harness. This can be configured to replace the current harness, open a new harness, or launch a harness in a pop-up window.

Suggest Edit

50% found this useful

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.