API from 2.0 to 3.2
String strPageName= "PharmacySearch";
String propName="24hour";
String strSQLStatment=tools.getParameterValue("sql");
Page objResultsPage=createPage("Code-Pega-List",strPageName);
Property objClassProperty=objResultsPage.getProperty("pyObjClass");
objResultsPage.setValue("pyMaxRecords","0");
if (objResultsPage.RDBExecute(strSQLStatment))
{
java.util.Enumeration enum=objResultsPage.getProperty("pxResults").forEach();
while (enum.hasMoreElements())
{
Property row = (Property) enum.nextElement();
Page rowPage = row.getAsPage();
String strKey = rowPage.getValue(propName);
rowPage.setValue("pyLabel", strKey);
}
}
else
{
}
I am getting below issue while upgrading from version 5 application to version 7.Enum Syntax issue and method issue.
Test compilation failed: ----------
1. ERROR in /Rule_Obj_Activity_UHG_FW_Audit_Data_Pharmacy_ExecuteRDBMethods1_Action_20160328T074222_855_GMT.java (at line 257)
java.util.Enumeration enum = objResultsPage.getProperty("pxResults").forEach();
^^^^
Syntax error on token "enum", delete this token
Enum Issue is solved by renaming to any random string but still getting issue with using these methods.
the method createPage(String, String) and getParameterValue(String) is undefined for the type.
Any help is appreciated.