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

Changing Custom Field value in Web API

Highlighted
Envoy2064
Super Collector

Changing Custom Field value in Web API

Hi, I have successfully found the name of the custom field in Web API (CICode5). However, I cannot seem to find the method that will get and set the value of the field for a particular configuration item. Which class should I look into for this information? Thanks in advance.
3 REPLIES
Mike Bush
Honored Contributor

Re: Changing Custom Field value in Web API

The class IConfigurationItem has methods getCICode5() and setCICode5().

To look for all of the possible values you may need to establish an ICICode5Home to do findAllCICode5
Envoy2064
Super Collector

Re: Changing Custom Field value in Web API

Do you mean searchOnCICode5()? I used JEdit code editor to search for getCICode5() or setCICode5() and did not find any instance of it in IConfigurationItemHome.java...

Thanks.
Vasily Kamenev
Honored Contributor

Re: Changing Custom Field value in Web API

Hi
This method to get all codes from code5
ICICode5 code[] = session.getCICode5Home().findAllCICode5();
This method to create one new recods in code
ICICode5 code = session.getCICode5Home().openNewCICode5();
code.setText("XXX");
code.setOrdering(new Integer(100));
code.save();
are you searching this information?

Vasily
//Add this to "OnDomLoad" event