BISWAJIT-2 Member since 2010 21 posts
Tata Consultancy Services
Posted: 4 years ago
Last activity: 4 years 3 months ago

Calling activity from HTML in section

Hi, I am trying to call an activity and pass parameter to it from java script in a Section. I am not been able to do this. I'm using below code:

var varNameOnCard = "Biswajit";
oSafeURL =null;
var oSafeURL = new SafeURL("Grp-Data-Fin-PaymentAccount-Card.PostAuthSemafoneTest",getReqURI());
oSafeURL.put("NameOnCard", varNameOnCard )
//var strReturn = httpRequestAsynch(oSafeURL.toURL(),null, 50, 100);
//pega.util.Connect.asyncRequest('GET', oSafeURL.toURL(),'');
var strResponse = httpRequestAsynch(oSafeUrl.toURL(),"post");

However if I use the below JSP, activity is invoked correctly but I can't pass the parameter on to it from java script code. So if any body can please help understand why the former is not working. Many thanks for help.

String strNameOnCard = "Biswajit";
ParameterPage newParams = null;
HashStringMap keys= null;

newParams = tools.getParameterPage();

keys = new HashStringMap();
keys.putString("pxObjClass", "Rule-Obj-Activity");
keys.putString("pyClassName", "Grp-Data-Fin-PaymentAccount-Card");
keys.putString("pyActivityName", "PostAuthSemafoneTest");
tools.doActivity(keys, tools.getPrimaryPage(), newParams);

***Updated by moderator: Lochan to add Categories***

Data Integration Java and Activities User Interface
Moderation Team has archived post
Share this page LinkedIn