getcurrentuser

L

lian

In infopath,I can show the current user name and Domain name in textbox
through review ,but it can not see the result in .xml.

code:
function XDocument::OnLoad(eventObj)
{
var objNetwork = new ActiveXObject("WScript.network");


//Retrieve the UserName and write it into the my:UserName field
XDocument.DOM.selectSingleNode("//my:UserName").text
=objNetwork.UserName;

//Retrieve the UserDomain and write it into the my:UserDomain field
XDocument.DOM.selectSingleNode
("/my:myFields/my:UserDomain").text
= objNetwork.UserDomain;
}

requst help!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top