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

Getting OVSD client view using WEB-API

Highlighted
anwar sheik daw
Occasional Advisor

Getting OVSD client view using WEB-API

hi,

1. Is it possible to get the client views by using OVSD web-api?

2. I need to get all service calls with the status != closed by OVSD WEB API, however i didn't find any direct method in IServicecallStatus
Change is inevitable Growth is intentional
2 REPLIES
Vasily Kamenev
Honored Contributor

Re: Getting OVSD client view using WEB-API

HI
Use IServicecallWhere for searching, searching by views not supported by web-api.

Vasily
Shilovskiy.Oleg
Occasional Contributor

Re: Getting OVSD client view using WEB-API

Suppose that you have 6 Servicecall status with ordering 10,20,30,40,50,60
(ordering you can see in Admin Console)

60 - is the ordering of your "Closed" Servicecall Status.

This code

SdClientBean bean = new SdClientBean("server","login", "pass");
IServicecallWhere scWhere = bean.sd_session().getServicecallHome().createServicecallWhere();

IStatusServicecall[] scStRange = new IStatusServicecall[]{
(IStatusServicecall)bean.sd_session().getStatusServicecallHome().searchOnOrdering(new Integer(10))[0],
(IStatusServicecall)bean.sd_session().getStatusServicecallHome().searchOnOrdering(new Integer(50))[0]
};
scWhere.addCriteriumOnStatusRange(scStRange);
IServicecall[] sc = bean.sd_session().getServicecallHome().findServicecall(scWhere);


find all Servicecall with statuses less than "closed"

I thik it's a joke from HP programmers IStatusServicecall - your Interface ^)
//Add this to "OnDomLoad" event