Service Desk Practitioners Forum

SP21 API Error

Metin INAN_1
Super Contributor.

SP21 API Error


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 ?

Mike Bush
Acclaimed Contributor.

Re: SP21 API Error


The "acc = per.getAccount();" should be outside the role add loop ( for efficeincy, and also the ";") 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 :-
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!