Question

When the function is run and the pega.api.ui.actions.launchLocalAction(options); is executed nothing happens

Hi Guys,

I am trying to launch localAction using similar approach. Ignore the fact that localAction is configured on button click. It is just to test the function.

When the function is run and the pega.api.ui.actions.launchLocalAction(options); is executed nothing happens. I have console logs in place to see that function itself is getting fired.

Please advise.

  1. <button onclick="myFunction()">Click me</button>
  2. <script>
  3. function myFunction() {
  4. var e = window.event;
  5. var options ={
  6. flowAction: "<SectionName>",
  7. displayMode: "pega.api.ui.constants.MODAL_DIALOG",
  8. event: e,
  9. flowActionClass:"<Class>"
  10. };
  11.  
  12. pega.api.ui.actions.launchLocalAction(options);
  13.  
  14. }
  15. </script>
Branched Post Information: 

Comments

Keep up to date on this post and subscribe to comments

Pega
June 13, 2019 - 8:53am

Hi ,

check for any console errors , and if there are no errors then check with the function ,(keep the debugger here)

function  launchLocalAction: function(a) {

debugger;
            if (a && a instanceof Object) {.....

the defination you can find in pega_ui_harness_defered js.

 

June 13, 2019 - 6:23pm
Response to sahuv1

Hi,

I am using 7.1.8 and I could not find pega_ui_harness_defered js.

Also when I try to execute "pega.api.ui.actions" in chrome console, I get below error. Please advise.

 Uncaught TypeError: Cannot read property 'ui' of undefined
    at <anonymous>:1:10

Pega
June 13, 2019 - 11:50pm

Hi Murthy,

API to launchLocalAction using pega.api.ui.actions namespace is exposed to application developers from pega 7.3 version.

It can be used as pega.api.ui.actions.launchLocalAction(options);

This cannot be used in 7.1.8, you can try api's from pega.u.d... to achieve your requirement.

Thanks.