We currently allow approvals via email. We have setup keywords such as "approved" and "denied" that update the status of the change request to approved/denied. The one issue we have is that we cannot see who voted for the approval. The only way I can see is to look at the email module for incoming emails. If we have users approver or deny in self service they correctly show who voted. Looking to see if anyone has encountered this issue and how they got around it.
1 of 1 people found this helpful
If it is needed to link the actual user you could pull the email address form the incoming email pass it to the to the approval vote tracking object then run a search and link or parse out the user name from an employee record to get the look up of the user.
You might if using an XSLT parser be able to do the lookup as part of the transform.
1 of 1 people found this helpful
At the core of the issue is the following Editing Rule on FRS_ApprovalVoteTracking:
$(if Status != "Pending" then CurrentLoginId() else null)
When the vote is approved/denied, the current user's login ID is put in the Voted By field. When the vote is made via email, the current user is InternalServices. This is what prevents you from seeing who voted on the Approval Vote Tracking records.
One solution could be to adjust this rule to set Voted By to the vote owner's ID if CurrentLoginID = InternalServices. If your Employees use their email address as their LoginID, this could be as simple as changing it to:
$(if Status != "Pending"
then if CurrentLoginId() == "InternalServices"
If Email != LoginID then you would need to build something a bit more complex, but it should be doable (e.g. adding an OwnerLoginID field to FRS_ApprovalVoteTracking, populating it at vote creation and using that instead of OwnerEmail in the above expression).
I ran into this, and the solution for me is a combination of both previous answers, knowing that neither is complete.
I use an XSLT to parse incoming mails into various objects. I had to make these changes to Approval_Update.xsl
Add the email address of the sender to a variable:
<!-- for each RelatedBusinessObject -->
<xsl:when test="@Name = 'Employee'">
<xsl:when test="@Name = 'PrimaryEmail'">
Put that variable into a custom field on the approval tracking object.
Modify the FRS_ApprovalVoteTracking object:
Add the custom field (obviously).
Modify two business rules:
Changed the Edit rule for Status to update VotedBy from it's default to
then if Status != "Pending"
then if Isnull(AARTFIELD_ApprovedBy) then CurrentLoginId() else AARTFIELD_ApprovedBy
then go to the BeforeSave rule for VotedBy and do the same thing!
As far as I've tested, this works. Note that:
- anyone with the ability to send in emails can vote if they know the vote's tracking ID (the 5 digit number in the subject line). it doesn't bother to verify the vote is from who it should be, for some reason. We're going with the assumption this won't be an issue because a. nobody bt the approver gets an email telling them to vote and b. we see who voted if we have to go back and check how come something got approved that shouldn't be. From an audit perspective, we're covered.
- technically I'm nabbing the email address not from the sent email but from the Employee record it is already associated with when it gets handed to the XSLT parser. This would mean that an invalid sender would also show an invalid email address. I haven't worked out how to grab the actual address from the email but since we (will soon?) disallow externals emailing into our service manager mailbox, this isn't a problem in my case.