static void GenericFindServiceCall(Args _args)
{
DictClass dictClass;
anytype objValue;
Object object;
ExecutePermission permission;
str strClassName="KT_ActivitiesListService";
str strTableName="smmActivities";
str strMethodName="find";
aifcriteriaElement criteriaElements,criteriaElement1,criteriaElement2;
aifQueryCriteria objqueryCriteria;
container objContainer;
aifQueryCriteria queryCriteria;
objContainer=[1,strTableName,"KTPAGING",1,1,10];
/* = conins(c,1,"SalesTable");
c = conins(c,2,"SalesId");
c = conins(c,3,salesIdValue);*/
//info(tableid2name(2303));
//info(tableid2name(8152));
//pause;
// criteriaElements = aifCriteriaElement::create(objContainer)
criteriaElements = AifCriteriaElement::newCriteriaElement(tablestr(smmActivities),
"KTPAGING",
AifCriteriaOperator::Range,
"1","10");
/*criteriaElements[0] = new CriteriaElement();
criteriaElements[0].DataSourceName = "SalesTable";
criteriaElements[0].FieldName = "SalesId";
criteriaElements[0].Value1 = salesIdValue;*/
objqueryCriteria = new aifQueryCriteria();
criteriaElement1 = AifCriteriaElement::newCriteriaElement(tablestr(smmActivities),
fieldstr(smmActivities, Closed),
AifCriteriaOperator::Equal,
enum2str(noyes::No));
/* criteriaElement2 = AifCriteriaElement::newCriteriaElement(tablestr(smmActivities),
fieldstr(docuref, RefRecId),
AifCriteriaOperator::Equal,
"5637666290");
*/
objqueryCriteria.addCriteriaElement(criteriaElements);
//objqueryCriteria.addCriteriaElement(criteriaElement1);
// objqueryCriteria.addCriteriaElement(criteriaElement2);
// Grants permission to execute the DictClass.callObject method.
// DictClass.callObject runs under code access security.
permission = new ExecutePermission();
permission.assert();
dictClass = new DictClass(className2Id(strClassName));
object = dictClass.makeObject();
if (dictClass != null)
{
//If it is static method
//dictClass.callStatic(methodName);
objValue = dictClass.callObject(strMethodName, object, objqueryCriteria);
}
// Closes the code access permission scope.
CodeAccessPermission::revertAssert();
}
{
DictClass dictClass;
anytype objValue;
Object object;
ExecutePermission permission;
str strClassName="KT_ActivitiesListService";
str strTableName="smmActivities";
str strMethodName="find";
aifcriteriaElement criteriaElements,criteriaElement1,criteriaElement2;
aifQueryCriteria objqueryCriteria;
container objContainer;
aifQueryCriteria queryCriteria;
objContainer=[1,strTableName,"KTPAGING",1,1,10];
/* = conins(c,1,"SalesTable");
c = conins(c,2,"SalesId");
c = conins(c,3,salesIdValue);*/
//info(tableid2name(2303));
//info(tableid2name(8152));
//pause;
// criteriaElements = aifCriteriaElement::create(objContainer)
criteriaElements = AifCriteriaElement::newCriteriaElement(tablestr(smmActivities),
"KTPAGING",
AifCriteriaOperator::Range,
"1","10");
/*criteriaElements[0] = new CriteriaElement();
criteriaElements[0].DataSourceName = "SalesTable";
criteriaElements[0].FieldName = "SalesId";
criteriaElements[0].Value1 = salesIdValue;*/
objqueryCriteria = new aifQueryCriteria();
criteriaElement1 = AifCriteriaElement::newCriteriaElement(tablestr(smmActivities),
fieldstr(smmActivities, Closed),
AifCriteriaOperator::Equal,
enum2str(noyes::No));
/* criteriaElement2 = AifCriteriaElement::newCriteriaElement(tablestr(smmActivities),
fieldstr(docuref, RefRecId),
AifCriteriaOperator::Equal,
"5637666290");
*/
objqueryCriteria.addCriteriaElement(criteriaElements);
//objqueryCriteria.addCriteriaElement(criteriaElement1);
// objqueryCriteria.addCriteriaElement(criteriaElement2);
// Grants permission to execute the DictClass.callObject method.
// DictClass.callObject runs under code access security.
permission = new ExecutePermission();
permission.assert();
dictClass = new DictClass(className2Id(strClassName));
object = dictClass.makeObject();
if (dictClass != null)
{
//If it is static method
//dictClass.callStatic(methodName);
objValue = dictClass.callObject(strMethodName, object, objqueryCriteria);
}
// Closes the code access permission scope.
CodeAccessPermission::revertAssert();
}
No comments:
Post a Comment