.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Automatically populating Contact Selector not working in Form Services

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :SharePoint
Hi,I'm currently working on a form where i wan't to automatically populate a contact selector control with a users manager. I've got the managers userid, called the ResolvePrincipal webservice provided by sharpoint, and set all the values in the contact selector with the correct values. When previewing it works perfectly however when i move the form to Form Services it won't work.I've tried setting it via rules: i.e. on the change of a textbox write the manager values to the contact selector.I've tried setting the default values of the contact selector to fields where i write the manager values.I've tried setting it through code i.e. SelectSingleNode() and SetValue() for each of the fields in the contact selector.All of which work fine in preview mode but will not work in Form Services, UNLESS the contact selector already has a user in it. So if the contact selector is blank it won't work, however as soon as i manually select a user then try using any of the previously mentioned methods of setting the control it works. While using code i get a nullreferenceexception which leads me to think that possibly when theres no user in the control the xml nodes representing the AccountId, DisplayName, AccountType don't exit???? TO throw another spanner in the works, on the very odd occasion it will work in Form Services as expected, after celebrating and trying again it returns

View Complete Post

More Related Resource Links

Contact Selector - Form tab index is lost after selector resolves names on blur


I'm working with an InfoPath2007 form developed to be filled-out through the browser on a SharePoint 2007 site, and I'm testing using Internet Explorer 7.  It's a straight-forward form, with a number of text fields and two Contact Selector controls.

The issue I'm encountering is with the Contact Selector control, where if the actor only enters a partial name into the text-field and then TABs away from the control the form will perform its auto-postback to look-up and resolve the partial name (showing the name resolution dialog is necessary), and afterward the actor's cursor is focused on the next field in the form.  The actor can type text into the focused field, but any subsequent pressing of the TAB key returns the actor's focus to the browser's ADDRESS bar, which is incorrect as it should proceed to the next field in the form.  I understand that the Contact Selector needs to perform its postback to perform the name resolution (so that there is no way through the InfoPath form designer to disable postbacks for the control), but why does the browser not know how to continue the TAB order of the fields on the form even when a field has focus?

Contact Selector Failed in MOSS Workflow Modification Infopath Form

Hi,   In my proof of concept Moss 2007 WF, I tested an Infopath modification form successfully.  Then the contact selector ActiveX control was added but it failed to open using the modification link of the workflow page.  In a different form for the WF initiation, I similarly created two CS controls and it worked there.  A snippet of the MOSS error is below   Object reference not set to an instance of an object.   at Microsoft.Office.InfoPath.Server.Controls.ContactPicker.RenderClientViewDataLeafContent(XPathNavigator context, IRenderContext renderContext, ControlViewData controlViewData, ScriptWriter writer)    at Microsoft.Office.InfoPath.Server.Controls.LeafControl.RenderClientViewDataContent(XPathNavigator context, IRenderContext renderContext, ScriptWriter writer)    at Microsoft.Office.InfoPath.Server.Controls.BaseControl.RenderClientViewData(XPathNavigator context, IRenderContext renderContext, ScriptWriter writer)    at Microsoft.Office.InfoPath.Server.Controls.ContainerControl.RenderClientViewDataContent(XPathNavigator context, IRenderContext renderContext, ScriptWriter writer)    at Microsoft.Office.InfoPath.Server.Controls.BaseControl.RenderClientViewData(XPathNavigator context, IRenderContext renderContext, ScriptWriter writer)    at Microsoft.Office.InfoPath.Server.Controls.CollectionControl.RenderClientViewDataContent(XPathNavigator context, IRenderContext rend

Contact selector InfoPath forms services


I want to filter users displayed in contact selector by group.

So, i don't want to display all users but only users in a special group

Infopath form services connectivity of printer



I am facing issue of printer connectivity from Infopath form services.

I have lines of code through which i can connect to printer using Infopath client mode.

I have shared the printer. Also the printer is set as default

The same lines of code is not working for browser enabled Infopath form.

Need help

Here is my lines of code. Is it there any credentials need to be passed ?



void btnSubmit_Clicked(object sender, ClickedEventArgs e)




Best regex for email body on contact form?

I'm not sure the best way to do a regex for the body section of an email contact form.  I want to use the regex to prevent more than 150 characters from being entered.  I assume this is sufficient, I may need more.  I also want it to help guard against sql injection attacks. The more I think about it the more characters I can think of that should be allowed.  I want to allow punctuation since it's for an email and people should be using full sentences.  These are some other things that make sense to allow: " , ', : , ; , $ , . , ! , ? , - , _ , @ , & , ( , ). They cover situations when someone may put an email address or phone number in the body section for the email.  I also want to allow letters and numbers.    I'm not sure if it's best to allow the characters I mentioned or not allow characters that pose a potential threat.  I think allowing the ones I want is the best way, but I'm not sure.  Can someone please give an example and/or suggestions?  Are there other characters that should be allowed?  I don't have much yet: "^(?i)[a-z0-9\s]{1,150}$"

Indexing services on window server 2008 is not working with .net

Hi, I am useing Microsoft indexing services in windows 2008 64 bit .I am getting error like "Exception from HRESULT: 0xC0000005" while i am createing  new catlog from .net 2.0.I am using  "ciodm.dll" for adding new catlog. i am using this code for create new catelog.   Dim Admin As New CIODMLib.AdminIndexServer   Admin.AddCatalog(varContractNo, txtCatelog.Text + "\" + varContractNo) Admin.Stop() Admin.Start() AddScope(txtDocFolderPath.Text, txtSite.Text, txtCatelogname.Text)   Please help me anybody have fixed this issue on window server 2008 64 bit.  

Contact Form Issues

I was hoping someone could assist with this issue I am experiencing.  I have a contact form on my ASP.net page.  Everything works great, but I keep getting blank messages sent to my email address.  It seems to be some sort of SPAM?  Could someone please tell me why this is happening, and what I would need to do to prevent it from happening in the future?

Infopath Form services help

Hi, I have a Sharepoint List "List C" , which has two look up fields from two lists List A & List B. Currently when a user enters a new item in List C, he picks a value from the two lists (A&B) However, List A has  mutli-value Look up from List B. Now I would like to customize Sharepoint List form for List C (hopefully use Infopath form services), and achieve cascading. i.e When a user Picks a value from List A to enter a new item in List C, I would like to casacade the Multivalue Look up values from List B. Is this possible at all? If so, can anyone out line a procedure? Thanks so much.          

WSDL not working for SQL Reporting Services 2008

I have seutp reporting services successfully, but now i want to generate a proxy to be able to interact progromatically with the reporting services 2008 like I did in 2000 and 2005.  I have tried viewing the WSDL from a command like this:   http://localhost/reportserver/reportservice.asmx?WSDL and I get an error like this:   The path of the item 'WSDL' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash. (rsInvalidItemPath) Get Online Help Any thoughts?  I also tried from WSDL.exe, no dice. Thanksl Ben

Problem Resolving More Than One Contact Selector

On a Forms Services form I have 3 contact selectors.  The form connects to SharePoint and creates an item in SharePoint based on code behind. The problem is that only one of the contact selectors resolves automatically.  If the user clicks into the contact selector field manually and tabs off the field then it will resolve but I need to automatically resolve all contact selectors before the user clicks a button on the form to add the items to SharePoint list. If the user does not click into the contact selector field then the username in the field does not become underlined (i.e. resolved) as a valid username. When debugging I can see that the XML behind the form is as follows: <my:AssignedToPersons> <my:Person> <my:DisplayName>Bloggs, John</my:DisplayName> <my:AccountId>DOMAIN\jbloggs</my:AccountId> <my:AccountType>User</my:AccountType> </my:Person> </my:AssignedToPersons> <my:ManagerPersons> <my:Person> <my:DisplayName>Bloggs, Bill</my:DisplayName> <my:AccountId></my:AccountId> <my:AccountType></my:AccountType> </my:Person> </my:ManagerPersons> <my:ManagerPersons> <my:Person> <my:DisplayName>Bloggs, Jim</my:DisplayName> <my:AccountId></my:AccountId> <my:AccountType></my:AccountType> </my:Person&

Creating a contact form in asp.net using vb.net (4.0)

I'm using MS VS 2010 and my controls have already been created on the aspx page. i just need a sample code to send  the email to my exchange server in VB.net side of things. thanks in advance.

Target audiences not working in excel services web part

My appologies i posted this originally in the pre-2010 forum So i'm reposting here: We have recently upgraded to Sharepoint 2010 and we're experiencing problems with the "target audience" field being available to the users. I am not the CA admin though so it'll make this a bit tough to get solved if the problem is there. What i'm looking for are the suggestions of things for me to forward to the CA admin to change or check if anything. We have a seperate Virtual Machine that is running 2010 that has this option available to users on that farm for some reason. however on our corporate farm we don't have that option available. Plus on top of this the quick launch items are not working with audiences as well to turn off the headers to links that have nothing in them due to security trimming on document libraries. I'm hoping that this being a more of an overview of things to check would help others who may have this problem as well. I've seen resolutions such as rebooting the server and such, however that's a bit lower level and we need some higher level things to check that may resolve the issue. Think the simple stuff first to check and lets work down the list. Doesn't matter how stupid it is but can we get a more compiled list of things to check to make sure that target audience visibility to users is enabled? Thanks!

Reporting Services doesn't connect to database automatically

Hello. I use Windows 2003 R2 x64 and SQL Server 2005 x64.  The problem is: if the Reporting Services Service were doesn't start automatically, despite the set up parameter "Restart Automatically" every 1 minute in the service Recovery property. So every minute after Service stopped i recieve an error in Event Viewer: Report Server (MSSQLSERVER) cannot connect to the report server database However, after starting it manually from Computer Management->Services or Reporting Services Configuration Tool it starts normally without any error. I use local system admin account to start Services and to connect to Database. Both parameters are set using RS Configuration Tool. Will be thankful for any advice.

Binding list to form not working with '&' character in list field data

Hi, I have a SharePoint list with a field called Title. I have a form based on this list with the field bound to the form as a label (for workflow to access). Here is the code for the form field. <asp:Label runat="server" id="ff2{$Pos}" text="{@Title}" __designer:bind="{ddwrt:DataBind('u',concat('ff2',$Pos),'Text','','ID',ddwrt:EscapeDelims(string(@ID)),'@Title')}" /> I have a workflow that runs through a form action button which take ff2 (title) and  does other stuff. The problem I have is with records where the value of 'title' contains the '&' character (example ab&cd). Blank is pulled in by the workflow when I get the value of ff2. I am guessing it has to do with the data binding and/or escape (special) characters coming through but I don't know how to fix it. Any help will be greatly appreciated

Configuring and Getting Started with InfoPath Form Services

Hi guys, I have some general questions regarding InfoPath Form services that I've been trying to research but I can't seem to get a straight answer from my google searches, so I'm really hopinh you guys can help me. We recently upgraded to SharePoint Enterprise 2010 and I will be the main person in charge of the content and administration. We had a 3rd party do the installation for us, but they don't know much about the From capabilities. We have several forms that we need to build and put on SharePoint so that our field managers (all around the country in 8 different states) can fill out, and submit. All of the information that they submit, or that is presented on a dropdown menu on the forms will be coming from our Microsoft SQL database on  a new sql2008 server we just bought. I have already made a database on the new server with just two tables in it in order to test out the forms. I was looking around on SharePoint and from the error message I got, I was under the impression that I first needed to build the form on InfoPath2003 (that's the version of office we have) and then just publish the form to SharePoint. Is this true? It's this simple? The more I looke online it seemed that I first needed to upload a data connection to SharePoint Central Administration..? the problem with that I would have to convert our sql database to the data type that it needs with

InfoPath Form Forms Services and Identity?

We have an InfoPath form running under InfoPath forms services that opens a data connection to a SQL database to invoke a stored procedure using Integrated Security.  It connects as NT AUTHORITY\ANNONYMOUS  LOGIN and is denied access. The following query failed: CPI_RPI_Table (User: LITWARE\smith, Form Name: CPI-RPI-Index-Published, IP: , Request: https://www.litware.com/_layouts/Postback.FormServer.aspx, Form ID: urn:schemas-microsoft-com:office:infopath:CPI-RPI-Index-Published:-myXSD-2010-09-14T19-44-07, Type: DataAdapterException, Exception Message: The form cannot connect to the data source. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.) When we run it in the InfoPath client, it connects with the users credentials. Can we have the form default to another identity, that of the SharePoint Service acount? Thanks, Nikos

create Entity for contact form without database in ASP.NET MVC

I have created in ADO.NET Entity Framework entity for contact form with fields: id, email, subject, message - I don't have that table in database.  And I have an error: Error    Error 3027: No mapping specified for the following EntitySet/AssociationSet - ContactSet.    C:\Users\TEST\Documents\Visual Studio 10\Projects\MvcApplication2\MvcApplication2\Models\CMSModel.edmxScreens:After clicked on this error:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend