Can Sharepoint open coded form??? - InfoPath Dev
in

InfoPath Dev

Can Sharepoint open coded form???

Last post 11-17-2006 01:00 AM by jaloplo. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 11-13-2006 01:37 AM

    • jaloplo
    • Not Ranked
    • Joined on 11-10-2006
    • Spain
    • Posts 8

    Can Sharepoint open coded form???

    Hi all,

    I have a problem open a coded Infopath 2007 form in Sharepoint.

    I have one form that has a textbox. This textbox is filled in the initialization of the form with my name:

    MainDataSource.CreateNavigator().SelectSingleNode("/my:Clientes/my:Nombre", NamespaceManager).SetValue("Jaime");


    The form works fine when I execute it from VSTA. Then, the form is publish in one Sharepoint list and when I try to open it (or create a new form) appears this message:

    Infopath 2007 can't create new blank forms. Infopath 2007 can't open this form.


    The details are:

    The form template try to access to local files and machine configurations...


    How can I solve this problem???

    PD: Sorry about error messages. I've translated from Spanish and am not sure about it.
  • 11-14-2006 10:41 AM In reply to

    Re: Can Sharepoint open coded form???

    Hi Jaime and welcome to our forum!
    Only Full Trust forms can access local file and machine resources. You can set your form to Full Trust but then deploying to SharePoint will require a digital certificate. My recommendation would be to remove the code that requires Full Trust and deploy it.
    Patrick Halstead
    Project Manager at Qdabra
  • 11-15-2006 06:19 AM In reply to

    Re: Can Sharepoint open coded form???

    Hello,

    at first, set you secruitylevel on auto! every form that has code, is automaticly domaintrust. and write your code in the loading event! form options>programming>load event.
    If your code doesnt work, try this:

    using System.Xml;
    using System.Xml.XPath;

    System.Xml.XPath.XPathNavigator root, user;
    root = this.MainDataSource.CreateNavigator();
    user = root.SelectSingleNode("//my:language", this.NamespaceManager);
    if (user.Value.Length <= 0)
    user.SetValue(<put in a variable>.toString());


    Hope this helped
  • 11-15-2006 09:55 PM In reply to

    Re: Can Sharepoint open coded form???

    Thanks Jan! That was how I should have responded... :)
    Patrick Halstead
    Project Manager at Qdabra
  • 11-16-2006 04:53 AM In reply to

    • jaloplo
    • Not Ranked
    • Joined on 11-10-2006
    • Spain
    • Posts 8

    Re: Can Sharepoint open coded form???


    Hi janditze,

    I follow the steps you wrote until the code. And the result is that the Infopath shows Ok from Sharepoint, but there is an error when I submit the form clicking in the button. The message is this:

    Infopath can't send the form. Th OnSubmitRequest event handler return a value that especifies the form couldn't send.

    I'll try the code of your post, but how do it helps me???

    Thanks!!!
  • 11-16-2006 08:18 AM In reply to

    Re: Can Sharepoint open coded form???

    Hey,
    how do you submit your form? With teh data connection wizard, or with code? Seems like your submit isn*t configured correctly.

    The code i added is another way to write something into a textbox. It won't help you at your submit problem.

    bye
  • 11-16-2006 08:47 AM In reply to

    • jaloplo
    • Not Ranked
    • Joined on 11-10-2006
    • Spain
    • Posts 8

    Re: Can Sharepoint open coded form???

    My form has three textbox and another one that can be multiple, that is, this field stores as phone numbers as the user wanted. So, I have to save all of these phone numbers in a list and the rest of three textbox in another list (both lists have a common field).

    Instead of save the form into Sharepoint, the form has a button to save to Sharepoint all fields filled in and then, the form has to go to trash, so I have to code the Click event of the button.
  • 11-17-2006 01:00 AM In reply to

    • jaloplo
    • Not Ranked
    • Joined on 11-10-2006
    • Spain
    • Posts 8

    Re: Can Sharepoint open coded form???

    Ok,
    I checked the code and I use it on Loading and Shutdown form events, but it didn't work well. On Loading Event it inserted data on lists but with no information that users wrote, it's like first insert without user intervention and then forget all about the form.
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.