I've been testing a technique I found on several web sites of accessing the UserProfileService web service, with the GetUserProfileByName method, to obtain information about the current user without having to write any C#, etc. code.
I can get information about myself into an InfoPath text field okay.
I have a slightly different scenario with which I need help.
When the form is created new, I want to populate fields with the current user's account name, Preferred Name, Department, and email address. This I can do, placing the results into text fields.
What I want the form to be able to do, however, is to allow the user to replace his/her own current account name in one of the text boxes with the name of someone
else's account, take some action (button press, etc.), and have InfoPath retrieve that person's profile and place their information
into the fields.
Of course, once the form is saved, subsequent opening by someone should NOT replace the form data with that user's information.
Is this doable? How do I pass along an account name as an argument to the GetUserProfileByName methods?
Thank you for your help