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

How to set initiator into new work order?

Occasional Advisor

How to set initiator into new work order?


I try to create a new work order. I get Person using method searchOnIdentificationNumber(). What method let me add initiator (the Person) to new work order by his IdentificationNumber?
I try use setRequestor(), but get NullPointerException. Moreover, when I open existing work order and try to get Requestor using mehod getRequestor(), I also get NullPointerException. (on one's way question: what does mean method setApprovalInitiator() ?)
What role or rights need for my connection account?
Should I call any additional methods or do anything before?

Part of my code:
IWorkorderHome WOhome = session.getWorkorderHome();
IPersonHome personHome = session.getPersonHome();
IWorkorder wo = Wohome.openNewWorkorder();
IPerson initiator = null;
IPerson[] persons = personHome.searchOnIdentificationNumber("92134498");
if (persons.length == 1){ initiator = persons[0];}

Thanks in advance!
Occasional Advisor

Re: How to set initiator into new work order?

Can I create only work order without creating Servicecall or Change and without assigning work order with it?
//Add this to "OnDomLoad" event