Service Desk Practitioners Forum
cancel

SP21 API Error

Highlighted
Metin INAN_1
Super Contributor.

SP21 API Error

Hi,

We are trying to develop a small web-based application that sd admins can assing role(s) to application accounts in the selected organization.It seems that API does not work as expected.I got exception as "null".I have attached my code.

Any ideas ?

Thanks,
1 REPLY
Mike Bush
Acclaimed Contributor.

Re: SP21 API Error

Metin,

The "acc = per.getAccount();" should be outside the role add loop ( for efficeincy, and also the "acc.save();") and you should check that it actually returns a value since my first attempt also went "null" when I picked a person with no account!

BUT - with that fixed I get another strange failure :-
"com.hp.ifc.types.AppOID"
when I try the Add Role, this I do not understand.

Role handling was not in the original web-api issued with 4.5, it crept in at a service pack. I would suggest that it is still not all there and that you will need to raise a bug with HP, don't hold your breath!