Question

7
Replies
133
Views
sandeepy8948 Member since 2020 2 posts
Sun Life Financial Inc
Posted: April 27, 2020
Last activity: April 28, 2020

PEGA Java Script API

Hi,

I am trying to use PEGA Java Script APIS like LaunchHarness, LaunchLocalAction.My requirement is to launch a modal Dialog Whenever a user login. User can be developer , user, Manager etc. I tried using normal JS to click a button on a section to launch local action in harness and used the script in UserWorkForm. It is working fine.But i can not add a button for Developer portal harness as it is final rule. So i am trying the new approach using LaunchLocalAction JS API from UserWorkForm. But it is not getting executed.

My Script is as follows:-

<script type="text/javascript"> 

var options = { flowAction: "Modaldialog1", displayMode:"pega.api.ui.constants.MODAL_DIALOG", flowActionClass: "Data-Portal", };  pega.api.ui.actions.launchLocalAction(options);  });    </script>

It looks like some parameters or syntax issue to me.

for Launchharness API, it is getting executed but Harness is not loaded properly and few parts of older harness are also displayed.

Script for LaunchHarness is as follows:-

<script type="text/javascript">         pega.u.d.attachOnload(function(){

   pega.api.ui.actions.launchHarness({harness:"test1",

                                      harnessClass:"Data-Portal",  

                                      displayMode:pega.api.ui.constants.REPLACE_CURRENT,  

                                      

                                    });

});       </script>

I have tried all the other options but no success and it is bit urgent so any help will be really appreciated.

 

***Edited by Moderator Marissa to update Product and Version; platform capability tags***

 

Pega Platform 8.3 Data Integration
Share this page LinkedIn