Con più domande
Is it possible to use Infopath to make updates to a user profile. I am using the ModifyUserPropertyByAccountName method of the UserProfileService.asmx. Using the same service, I can successfully read data into infopath using the GetUserPropertyByName method. Then I edit that data and try to submit the changed data to the ModifyUserPropertyByAccountName method of User PRofile Service. Nothing Happens!!!
I am making sure that the submitted data is in the required PropertyData Array format.
Can anyone give some recommendations in this regard?
What else can be done?
Should I program the InfoPath form manually?
Do you think it is not the right approach?
Tutte le risposte
Thanks for your reply. I looked into sharepoint logs and figured out the problem (I think!). It seems that the problem is associated with InfoPath not being able to submit all the rows of a repeating table. So, to be precise, here is what I am doing:
1. Get the data out from profile using the GetUserPropertyByName from UserProfileService into a repeating table in Infopath (because I want to get all the fields).
2. Edit that data, and submit the repeating table using the ModifyUserPropertyByAccountName method of the UserProfileService.
3. It works in the sense that I see no error. But then I looked into SP logs, and it seems only the first row of the repeating table is being submitted.
I look around the internet and found that this seems to be a general problem with Infopath. Any suggestions?
I can honestly say I havent tried this before, but I may know why this is happening.
The repeating table you are referring to is one you created in the main data sources, and you simply linked it to the tns:NewData parameter in the Submit data connection?
What field did you link to the tns:accountName parameter? Single node? or a node in the repeating table?
I'm pretty sure you can only update one profile per submit. Since the first parameter needs to conatin the account name for the profile to update, the array must be associated with the first parameter's value, with no way to include multiple accounts and arrays.
Someone else may have some more information on interacting with this web service than I do, however.
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Microsoft Online Community Support
Thanks for your reply. It seems I was not able to clearly explain my problem. I am not trying to modify more than one account, only one account but multiple properties there in. The rows of the repeating table are different properties associated with the account. The repeating table is populated on data import by GetUserPropoertyByName.
The ModifyUSerPropertybyAccontName method takes two inputs:
1. tns:AccountNAme: For this I am using a single node, independent of the repeating table.
2. tns:PropoertyData (Array): For this I am submitting the entire repeating table which was populated by GetUserPropertyByName.
On submission, I do not get any error. When I checked SP logs, I saw that only first column of the table is being submitted (and it is in the correct array format). This is why I said that it seems that infopath was not able to submit the entire repeating table.
I hope I make my problem more clear this time.
I'm wondering if you ever found a solution to this problem?
I'm trying to do the exact same thing. I'm hoping a few months later you may have figured something out? One account, multiple properties. It seems like there are not enough parameters in the method to be able to pass the right information into it. I would assume the method would need the account name, the fields it's getting its values from, and also the properties which it will be updating with these values. I don't understand how its supposed to know what exactly it is updating. I'm using the GetUserProfileByName method to pre-populate my fields.
Anyways, please let me know if you have managed to get this to work. I'd love you for it. In a very InfoPathic way.