Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Service Calls search using web-api

SOLVED
Go to solution
Highlighted
Soundra Pandian
Acclaimed Contributor

Service Calls search using web-api

Hi,

I need a help. I need to list all the service calls in service desk, which has value (not empty) in a field (SerShorttext10), using web-api.

Please let me know whether the following code can do it, or is there any other better way to do the same.

Thanks,
Soundar

IServicecallHome servicecallHome = aSession.getServicecallHome();
IServicecallWhere servicecallWhere = servicecallHome.createServicecallWhere();
String[] range = {"0", "ZZZZZZZZZZZZZZZZ"};
servicecallWhere.addCriteriumOnSerShorttext10Range(range);
2 REPLIES
Vasily Kamenev
Honored Contributor
Solution

Re: Service Calls search using web-api

Hi
Why not do easy?
IServicecallWhere scwhere = session.getServicecallHome().createServicecallWhere();
scwhere.addContainCriteriumOnSerShorttext10("*");
IServicecall[] sc = session.getServicecallHome().findServicecall(scwhere);

Vasily
Soundra Pandian
Acclaimed Contributor

Re: Service Calls search using web-api

Hi,

Thanks for your help... Is "*" means, not empty?

Thanks a lot,
Soundar
//Add this to "OnDomLoad" event