Service Desk Practitioners Forum
cancel

Setting values in service call for custom field using web-api

Highlighted
Shmakov Paul
Contributor.

Setting values in service call for custom field using web-api

Hello.
I've got problem, using web-api for creating service calls.

The deal is:
i'm creating service call from .xml files using web-api.
_______________
code:
...
private IServicecall newServiceCall() throws Exception {
IServicecallHome scHome = apiSession.getServicecallHome();
IServicecall sc = null;
IStatusServicecall status = XML2SDHelper.GetStatusSC();
IPerson caller = XML2SDHelper.GetCaller();
IService service = XML2SDHelper.GetService();
IConfigurationItem configurationItem = XML2SDHelper.GetConfigurationItem();

sc = scHome.openNewServicecall();
sc.setDescription(XML2SDHelper.GetStringValue("Description"));
sc.setInformation(XML2SDHelper.GetStringValue("Information"));
...
_____________________

xml file looks like:
...
Caller here
Descr here
Info here
...
_____________________

I've created new Custom Field for Service Call of type Number (Integer).
Question: how can i get this value from xml to my sc?

Yes, it works when using default 9 integers (setServiceCallNumber#), but they all are in use and i need exectly to set custom field.

Did anyone manage to solve this problem?



Regards, Paul.
4 REPLIES
Vasily Kamenev
Acclaimed Contributor.

Re: Setting values in service call for custom field using web-api

Hi Paul.
If you are create one new CF( not activate from existing CF list), so you need regenerate web-api lib, only after you will have access to your new files by web-api. Use for detail infromation serivice pack doc itsm008292 - Unlimited Custom Fields, topic "Compile the Web API and Javadoc".

Vasily
Shmakov Paul
Contributor.

Re: Setting values in service call for custom field using web-api

That's what i needed. Thank you.
Vasily Kamenev
Acclaimed Contributor.

Re: Setting values in service call for custom field using web-api

It's good, Paul, close the thread if you got a solution.

Vasily
Shmakov Paul
Contributor.

Re: Setting values in service call for custom field using web-api

I have found a solution to this question as seen in the comments below.