I'm new to InfoPath (from some basic ASP) and I'm attempting to create a
PO/Procurement form for a corporate intranet.
I'd like to extract the current user's logon name onLoad and use that in an
LDAP query to return information on that user which could then be assigned
variables and placed in the order record. We'd prefer a real-time LDAP
connection to running a daily import to our procurement database (SQL Server
2000).
I'd prefer to do this in VBScript or Visual Basic (2005) but I'm having a
rough time finding any documentation. All InfoPath-related script
documentation seems to use JavaScript and Visual Studio documentation uses C#
or C++ for similar functions.
In a nutshell, I'm looking for some code snippets and a little direction to
get this project rolling. Best practices for this type of app would be
helpful.
Thanks!!!
k
S.Y.M. Wong-A-Ton - 01 Feb 2006 09:50 GMT
Just my 2 cents...
Although daunting for someone new to InfoPath, I would look into using web
services for this scenario if I were you, primarily to avoid security issues
and have loose coupling. You can check out lab 8
(http://msdn.microsoft.com/office/understanding/infopath/training/default.aspx?pu
ll=/library/en-us/odc_ip2003_tr/html/odc_inf_lab_08.asp)
for directions on how to use web services in InfoPath.
The logon name can be retrieved through code (System.Environment.UserName)
and passed to the web service. The webservice can then use this information
to do the LDAP query. For the latter you can use System.DirectoryServices
(see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fSystemDirectoryServices.asp).
You should be able to find some code snippets on the web by doing a Google
search; I've even seen VB.NET code using DirectoryServices on MSDN.
---
S.Y.M. Wong-A-Ton
> I'm new to InfoPath (from some basic ASP) and I'm attempting to create a
> PO/Procurement form for a corporate intranet.
[quoted text clipped - 17 lines]
>
> k
Ramana - 02 Feb 2006 08:18 GMT
Hi,
I actually found the help in the scripting editor and visit
http://infopathdev.com/forums/default.asp forums to find more help and more
information,
Thanks.
k.Ramana Reddy
www.autonomysystems.com
> I'm new to InfoPath (from some basic ASP) and I'm attempting to create a
> PO/Procurement form for a corporate intranet.
[quoted text clipped - 17 lines]
>
> k