Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

getGadgetData operation not working in doAction in Web Mashup

SA-19963

Summary



getGadgetData operation not working in doAction in Web Mashup

User has widget successfully running using Pega Web Mashup and it launches from the calling application.
User has added a Data Field and now trying to access the property in that Data Field using doAction but it is returning undefined in JS alert.

Below is the code used:

function GetSelectedCaseIds()
{
var SelectedCaseIds = pega.web.api.doAction("MyTestGadget", "getGadgetData", ".SelectedCaseIds");
alert("Test data " + SelectedCaseIds);
}

 

Error Messages



alert Java script function is throwing "undefined" error


Steps to Reproduce

  1. Setup the widget.
  2. Add Data Field to the section and set the property.
  3. Add the doAction function.


Root Cause



Same Domain Origin Policy was not satisfied when testing.  The purpose of getGadgetData is to get content from the PRPC display area for use in the main top level application.  With out Same Domain Origin Policy met the outer application can not communicate with the PRPC generated iframe
 

Resolution

Always test mashup functionality in an environment that satisfies Same Domain Origin Policy.

Published February 18, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community 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.

Close Deprecation Notice
Contact us