The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

how do i get the approvers who vote yes at the approve sheet in web-api

SOLVED
Go to solution
Highlighted
Nathan Brand
Super Collector

how do i get the approvers who vote yes at the approve sheet in web-api

Hi,
We are using sd45 sp21.
I have a servlet that needs to show some detail about servicecall. one of the detail is all the voters who vote "YES".

did any one did it or know how do I do it.

I have found the way to get the approval status, and the group, and how many approved, what was the strategy and so on but i can't figer out how to get the members who voted yes.

thanks for any help.

thanks,
3 REPLIES
Alexander_43
Super Collector
Solution

Re: how do i get the approvers who vote yes at the approve sheet in web-api

Hi,

Here is a little example:

IApprovalVote votes[] = approval.getApprovalVotes();

for (int i=0 ; votes != null && i < votes.length ; i++) {
if (vote.getApproved()) {
//this approver voted YES
IPerson approver = vote.getApprover();
}
}
Nathan Brand
Super Collector

Re: how do i get the approvers who vote yes at the approve sheet in web-api

Thanks
but, how do i connect it to specific call?
Alexander_43
Super Collector

Re: how do i get the approvers who vote yes at the approve sheet in web-api

Tell me how you get the approval status, and the group, and how many approved. And I'll tell you how connect it to specific servicecall...
//Add this to "OnDomLoad" event