开发者

Retrieve the Current User name in sharepoint using webservices

开发者 https://www.devze.com 2023-04-09 04:11 出处:网络
I have designed a infopath form ,in that form load option I need to retrieve the current USERNAME. Who logged in the site must retrieve using WebServices only.

I have designed a infopath form ,in that form load option I need to retrieve the current USERNAME. Who logged in the site must retrieve using WebServices only. So I did that using UserProfileServices.asmx service and GetProfileByName Metho开发者_高级运维d. But I'm getting different USERNAMES ,Sometimes my USERNAME Sometimes form Admin etc.....Please let me know how can I do this....


Please specify what "sometimes" means... And where did you get different Usernames from (WebService or from the InfoPath userName() function)?

If it's the function, this is default behavior if you fill out the form using the client (InfoPath Filler). If it's the WebService make sure you also append the domain to the userName() like this

concat("MyDomain\"; userName())
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号