Solved
Call An Activity From Java Script
I have requirement to call an activity through java script .Could you please help me with that.
I have requirement to call an activity through java script .Could you please help me with that.
Accepted Solution
Hi @HarikaU9,
Please use the below code:
HashStringMapactivityKeys = new HashStringMap();
activityKeys.putString(“pxObjClass”, “Rule-Obj-Activity”);
activityKeys.putString(“pyClassName”, workclass);
activityKeys.putString(“pyActivityName”, “HistoryAndAttachments” );
tools.doActivity(activityKeys , workpage, tools.getParameterPage() );
Or you can use osafeURL to call an activity
Regards,
Prasad.
Please find the snippet
<script>
var options = { name: “activityName ", parameters: [{name: "param1", value: "Page1.prop1", isProperty: true}, {name: "param2", value: 123, isProperty: false}], contextPage: "page1.page2 ", event: eventObject }; pega.api.ui.actions.runActivity(options);
</script>
https://support.pega.com/question/how-call-activity-javascript
Discussion
Question
Discussion
Question Solved
Discussion
Discussion
Question Solved
Question Solved
Question
Question
Pega Collaboration Center has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.