After you create your custom query from the wizard.
You should write this method in remote service class:
public Object runCQGetArpAddress(IServerContext context, int arpCardRef)
{
QueryParams queryParams = new QueryParams();
queryParams.setCustomization(ProjectGlobals.getM_ProjectGUID());
//queryParams.getEnabledTerms().enable("T_NAME");
queryParams.getParameters().put("P_ARPREF", arpCardRef);
QueryBusinessObjects items = new QueryBusinessObjects();
try {
context.getServerQueryFactory().first("CQGetArpAddress", queryParams , items, -1,
false);
} catch (Exception e) {
e.printStackTrace();
}
return items;
}
Create an event and use the following code :
public void GetArpAddress(JLbsXUIControlEvent event)
{
try {
RemoteMethodResponse callRemoteMethod = clientContext.
callRemoteMethod("CSRV", "CQGetArpAddress", new Object [] {null,3});
if ((Boolean) callRemoteMethod.Result)
{
ProjectUtil.warn(event, "Başarılı");
} else
ProjectUtil.warn(event, "Başarısız..");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Cevap vermek için giriş yapmanız gerekmektedir.
Soru sormak için lütfen oturum açınız.
Execute custom Query
25/11/16 10:32   j-Platform/LPTHow to execute any custom query?
LPT query