Friday, 27 June 2014

How to call an activity from the java, java script

Using  java script
<Script>s
Function A ()
{
var urlPath = "./PRServlet" ;
var url = urlPath + "?pyActivity=GHC-HPlan-CS-Work.ABC&CSR=" + CSR;
window.open(urlPath,"_self");
}
</script>
 Or  you can use osafeURL to call an activity
Using  java :
      sHashStringMap activityKeys = new HashStringMap();
activityKeys.putString("pxObjClass", "Rule-Obj-Activity");
activityKeys.putString("pyClassName", workclass);
activityKeys.putString("pyActivityName", "HistoryAndAttachments" );
tools.doActivity(activityKeys , workpage, tools.getParameterPage() );

2 comments: