Service Desk Practitioners Forum
cancel

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

SOLVED
Go to solution
Highlighted
Nathan Brand
Trusted Contributor.

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
Respected Contributor.
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
Trusted Contributor.

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
Respected Contributor.

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...