How do I identify the user filling out the form?

M

Milton Plummer

I have created a form with info path that I have published on a Sharepoint
site. Both the Sharepoint and the form are synced with our active directory
accounts, therefore both the form and the sharepoint have already identifed
the current user. I am trying to build a submit datasource in the form to
automatically e-mail the creater of the form whenever it is changed. I know
this can be accomplished by setting up notifications in sharepoint, but I was
hoping to also set up notifications in the infopath form. Is it possible to
identify the user who created the info path form?
 
R

Rene Schrieken

You can with VSTO, write managed code to obtain the current user and then
use then System.Web.Mail to send an email.

I'm not sure if this can be done with no managed code...
 
M

Milton Plummer

Thank you, That is what I suspected. Do you by chance have a sample of the
code that I would need to use?
 
Y

Yueli Du

You can call System.Environment.UserName to get current user's network Login
ID (which is corresponding to distinguishedName in Active Directory)
 

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