Adding JavaScript code to Pega Platform applications when sourcing large data pages from a connector, activity, or data transform
To source large data pages from a connector, activity, or data transform, add the text file that contains the JavaScript populator function to your application.
- In the navigation pane of Dev Studio, click Records.
- Expand the Technical category and click Static Content Bundle.
- In the Bundle Name column, open the configuration tab for the rule by clicking pypega_ui_userscripts_offline.
- On the Definition tab, click the Add item icon.
- In the added row, add the JavaScript code to the UI rule:
- In the App name field, enter webwb.
- In the File extension field, enter js.
- In the File name field, enter the name of the
text file that contains the JavaScript function, for example,
expenses_datapage_api.For more information, see Defining a JavaScript function when sourcing large data pages from a connector, activity, or data transform.
- Check out the pypega_ui_userscripts_offline rule to your
development branch:
- Click the arrow next to the Private edit button, and then select Check out to branch.
- In the Check Out to Branch dialog box, in the Branch menu, select the branch that you created.
- Click Check out to branch.
- Click Save.
Previous topic Data population for large data pages in offline-enabled mobile apps Next topic Declaring a data page as large