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

Getting Approval Status from Java API....

SOLVED
Go to solution
Highlighted
JNM
Super Collector

Getting Approval Status from Java API....

Given a change record, how do you get the Approval status information (not the status field from the change record!)from the Approval sheet (Ready, Inactive) associated with the change record? I was unable to determine how to get that information based on the methods associated with change record and approval sheets.
8 REPLIES
Michel Vogelpoe
Honored Contributor

Re: Getting Approval Status from Java API....

You can't, it is a so called 'calculated-field'. Runtime it is determined what the value must be by checking the approval votes
JNM
Super Collector

Re: Getting Approval Status from Java API....

Michel,

Thank You! I was pulling out my hair on this one! I will just use the status field on the change record to determine the approval status!
Michel Vogelpoe
Honored Contributor
Solution

Re: Getting Approval Status from Java API....

I think I was mistaken............

There is a method called getApproval() on IChange which is inherited from IWorkflow
So you can get it by doing this:

IApproval = change.getApproval();

There are lots of method you can use, even the status of the approval.

Have fun.
JNM
Super Collector

Re: Getting Approval Status from Java API....

Michel,

That worked! Are those relationships (inheritance) published somewhere in a document?

Thanks!
Michel Vogelpoe
Honored Contributor

Re: Getting Approval Status from Java API....

Well there is the javadoc. It is regenerated at each servicepack.

In it you will find a description of all the classes and its methods
Jon Schneider_1
Occasional Advisor

Re: Getting Approval Status from Java API....

Where is this javadoc?
Thank you, sir! May I have another!?
Gyula Matics_1
Honored Contributor

Re: Getting Approval Status from Java API....

each service pack includes it. It is in the doc\Web API javadoc directory.
Jon Schneider_1
Occasional Advisor

Re: Getting Approval Status from Java API....

Thanks!
Thank you, sir! May I have another!?
//Add this to "OnDomLoad" event