Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / December 2006

Tip: Looking for answers? Try searching our database.

Infopath 2007 : Need to use managed code for browser based forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Atul Nisar - 14 Nov 2006 14:53 GMT
Hello,

1.

 I need to hide, disable certain portion of my Infopath form based on user
role.

 I am publishing my form in Sharepoint 2007 Server.

The form will be opened in browser by the end users.

How can I do this.



2.



Can we write managed server side code in browser compatible infopath 2007
forms?

We are trying to do this by using Visual Studio Tools for Application (VSTA
) but we get error while publishing this browser compatible infopath form
Josh - 15 Nov 2006 04:21 GMT
You  can do it with conditional formatting.  No code involved.

Put the portion in a section then conditional format the section based
on the users role. Put the fields you want inside the section.

Josh

> Hello,
>
[quoted text clipped - 16 lines]
>  We are trying to do this by using Visual Studio Tools for Application (VSTA
> ) but we get error while publishing this browser compatible infopath form
Atul Nisar - 18 Nov 2006 17:37 GMT
Hi Josh,

Thanks for the reply.
The user roles are not available for browser compatible forms.
We are able to use the managed code now.
We need to query AD using LDAP to retrieve user roles in managed code.

> You  can do it with conditional formatting.  No code involved.
>
[quoted text clipped - 23 lines]
> >  We are trying to do this by using Visual Studio Tools for Application (VSTA
> > ) but we get error while publishing this browser compatible infopath form
Josh - 20 Nov 2006 04:56 GMT
If you are wanting to do this server side, you'll have to make a
webservice that querys AD for you and then call that webservice from
your form.

I have some C# code that querys AD. By using code behind the form,
you'll need to sign it. I had implementation problems with a
webservice, but they're are examples out there.

Use this lab as reference. This is where I started.

http://msdn2.microsoft.com/en-us/office/ms788214(office.11).aspx

> Hi Josh,
>
[quoted text clipped - 30 lines]
> > >  We are trying to do this by using Visual Studio Tools for Application (VSTA
> > > ) but we get error while publishing this browser compatible infopath form
Aza - 07 Dec 2006 07:23 GMT
Hi Atul .. i am currently working on a simmular problem where by users that
are logged in see one view and anonymous users see another..

This works fine for logged users however when the anonymous user loggs in an
exception is thrown:  HttpException, Exception Message: Server cannot set
status after HTTP headers have been sent.

public void FormEvents_Loading(object sender, LoadingEventArgs e)
       {
               if (User is Authenticated)
                   e.SetDefaultView("Secure");  
       }

Any feed back would be appreciated Thanks

> Hi Josh,
>
[quoted text clipped - 30 lines]
> > >  We are trying to do this by using Visual Studio Tools for Application (VSTA
> > > ) but we get error while publishing this browser compatible infopath form
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.