Service Desk Practitioners Forum
cancel

Custom Codes & Web - API

Highlighted
Vladimir V.B.
Trusted Contributor.

Custom Codes & Web - API

Hi
I get custome code value for my java application(getWorkorderCode1), but when i try to change value by setWorkordercode1 i have error"setWorkorderCode1(com.hp.itsm.api.interfaces.IWorkorderCode1) in com.hp.itsm.api.interfaces.IWorkorder cannot be applied to (java.lang.String)).
How i can resolve this problem?
Best regards
6 REPLIES
Nirad
Super Contributor.

Re: Custom Codes & Web - API

Hi,

Can you please give some more detail?

What you are doing and what you want with code example so that i will try to give you some solution?

Thnaks
Vasily Kamenev
Acclaimed Contributor.

Re: Custom Codes & Web - API

HI
not possible doing sets by Sting, you need use:
setWorkorderCode1(IWorkorderCode1 value)

Vasily
Vladimir V.B.
Trusted Contributor.

Re: Custom Codes & Web - API

Hi
I can change value in java aplication, but value in sd interface isn't change.Why?
P.S. I use
workorderCode1.setText(jRadioButton1.getText());
workorderCode1.save();
workorder.setWorkorderCode1(workorderCode1);
orkorder.save();
Best regards
Venkatesha_1
Outstanding Contributor.

Re: Custom Codes & Web - API

Hi,

put stack trace so that if there are any errors we can trouble shoot.

Regards
Venkatesha
Vasily Kamenev
Acclaimed Contributor.

Re: Custom Codes & Web - API

Hm, strange code or I something misunderstood?
Why need save the code?
By my vision that mast be as :

IWorkorderCode workorderCode1[] = session.getWorkorderCode1Home().searchOnText(jRadioButton1.getText());

workorder.setWorkorderCode1(workorderCode1[0]);
workorder.save();


Vasily
Vladimir V.B.
Trusted Contributor.

Re: Custom Codes & Web - API

Thanks Vasily. I've resolve this problem