Skip to main content

I have a simple approval process where a user submits a an InfoPath form and their manger approves it.  I want to send an email to the user indicating the name of the manger that will be approving it.  From the K2 object browser I can select the manger of the originator to include in the body of an email but it comes out as K2:Domainuseraccount.  "Name" of the manger is not an option. 


 


 

Fortunately, this is easty to do.  However, the discussion below makes the assumption that your ActiveDirectory information is kept up-to-date.



  1. Create a SmartObject that connects to the GetUserDetails method of the built-in Active Directory 2 service
  2. In your email body, drop in the SmartObject method that you created in step 1 from the context browser
  3. A dialog will appear that asks for the UserName input property.  Use the context browser to supply the originator's manager.
  4. In the bottom part of the dialog, it lets you choose which property will be returned, in this case, use DisplayName.

At run time, when the email is being created it will supply the UserID of the originator's manager and then use that to look up in AD the display name of the manager.  Although not exactly the same question, I think this blog post may also be helpful:  http://www.k2underground.com/blogs/blacktop/archive/2009/04/20/who-am-i.aspx


David


Reply