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

Trouble in getting "Information" field contents (SD 4.5 SP 17)

Highlighted
Michael_RU
Occasional Advisor

Trouble in getting "Information" field contents (SD 4.5 SP 17)

Dear colleagues,

I have faced an unexpected problem: "null" value returns when I try to get all contents of "Information" field of the Service Call.

Here is how it goes:

public static void main(String args[]) {
if (args.length != 4) {
System.err.println("Usage : Example2 ");
return;
}
String server = args[0];
String username = args[1];
String password = args[2];
long id = Long.valueOf(args[3]).longValue();

ApiSDSession session = null;

try {
session = ApiSDSession.openSession(server, username, password);
} catch (RuntimeException e) {
// Something went wrong while logging on, show error
System.out.println(e.getMessage());
return;
}

// Get the home of the servicecall entity
IServicecallHome scHome = session.getServicecallHome();
IServicecall serviceCall = null;


try {
serviceCall = scHome.openServicecall(id);
} catch (RuntimeException e) {
// Datbase error or service call does not exist.
// Give message and give up.
System.out.println(e.getMessage());
return;
}


// Get Information Update
System.out.println("Information update: "+ serviceCall.getInformation());



public static final String REVISION = "$Revision: 3 $";
}


The result is: "Information update: null" :(

Does anyone know what is the problem here?
Thank you!
1 REPLY
Vasily Kamenev
Honored Contributor

Re: Trouble in getting "Information" field contents (SD 4.5 SP 17)

Hi
I think you have a real empty field, because you code is very clear. no bugs :)

Vasily
//Add this to "OnDomLoad" event