GetCommonManager - InfoPath Dev
in

InfoPath Dev

GetCommonManager

Last post 04-13-2010 07:35 AM by claydevin. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 04-10-2009 11:41 AM

    GetCommonManager

    Hi Guys,

    I have an infopath form that gets the User and Manager based on GetUserprofile and I have another Data Connection to get the CommonManager, The data is there but I don't know the exact steps to get the manager email address doing filtering. Anybody out there can post the steps.

     

    Thanks

  • 04-13-2009 03:41 PM In reply to

    After getting the manager from the GetProfileByName, you send that same piece of data to the GetCommonManager, and it returns a data set of relevant info just like the previous method.  You retrieve the data the same way - there should be no filtering.  Just remember to pass the manager's username to the GetCommonManager as a query item.

  • 04-13-2009 04:26 PM In reply to

    I tried the same reasoning for the common manager but that didn't as it will only give you the common manager with someone else and not their supervisor. In my example like if I pick myself and someone in my group it works but if I pick someone outside our group it wouldn't give their direct supervisor but the one above that which is common for both of us.

    Also I couldn't do Value/Name and then filter on Manager Workmail.

    If you know the exact steps I'd really appreciate if you post them.

     

    Thanks

  • 04-14-2009 08:16 AM In reply to

    I hadn't done this in a while, so I just tested it again to be sure.  This is what I'm doing:

    1) Using GetProfileByName and GetCommonManager in the same form.

    2) Upon opening the form, I let the logged-in user's AccountName send itself by default to the two web services.

    3) The resulting datasets show the profile data of my user and limited profile data of the user's manager.

    4) I simply make a text box that defaults to the "Email" attribute of GetCommonManager.  If I want to get the email of another person's manager, I just have to have that person's AccountName (i.e. ccobb, but not domain\ccobb).

    I am not familiar with the part that you are referencing here:

    "it will only give you the common manager with someone else and not their supervisor..."

    For me, it returns the "manager" of that person as determined by AD.  Just to be sure, I created another field named "username" and made a custom button with these rules:

    1) Set AccountName (GetProfileByName) to Username

    2) Set accountName (GetCommonManager) to Username

    3) Query GetProfileByName

    4) Query GetCommonManager

    After I type a username in that field (i.e. ccobb) and push the button, the Employee text box changes to that person's PreferredName, and the Manager text box changes to the email of that person's manager in AD.

  • 04-14-2009 09:45 AM In reply to

    My problem isn't getting the Manager name, that part works fine using "GetUserProfileName", I am trying to get the Manager's email so when user click on Submit the "TO" take that email address.

  • 04-14-2009 10:18 AM In reply to

    I explained exactly how to do that.  My entire example centers around displaying the Manager's email address using both web services.  It works like a charm for me the way I described it.

  • 04-13-2010 05:34 AM In reply to

    Clayton..anyone.... 
    I've been using a method like you layed out for a couple weeks now...   But...  I get the 5566 error for some of my users.  I have it pinpointed to the error below.  It is the GetCommonManager and not the GetProfilebyName data source.   I cant duplicate the error on my machine/profile or other dummy AD account we've created.   does it have something to do with how the username is passed?

    Thoughts?  We have a small team here and our test users patience is wearing thin.  

    ------------------
    The following query failed: GetCommonManager (User: DOMAIN\john.doe,  Exception Message: The remote server returned an error: (500) Internal Server Error.  Server was unable to process request. ---> Object reference not set to an instance of an object. The remote server returned an error: (500) Internal Server Error.)

  • 04-13-2010 06:34 AM In reply to

    Hey, Clay, nice name.  Have you verified that the test user has a manager assigned in the User Profile Database?  There are a few ways to check:

    1) Using the GetUserProfileByName method, display the Manager value and see what's there.  You probably will see nothing.

    2) Go to your SSP Admin > User Profiles and Properties > View User Profiles, and search for the test user.  Edit that user's properties and go see what is in the Manager field.  I'm guessing there isn't anything.

    If there is nothing in the Manager field, then first make sure the user has a Manager defined in AD, and then do another profile import to ensure the profile database gets updated.

  • 04-13-2010 07:35 AM In reply to

    got it to work, used a different method... one you mentioned on someone else's post.  didn't directly pull the manager name and email from GetCommonManager but used the UserProfilebyName and then followed your step below.  Not sure why it worked and the direct call didnt, but.......thanks! 

    "have a rule set on the Manager field that sets the GetCommonManager query field (AccountName) to the Manager's account name, and then it queries the WS"

Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.