Error No " 5337 " - InfoPath Dev
in

InfoPath Dev

Error No " 5337 "

Last post 11-29-2010 07:00 AM by mak.mansoor. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-29-2010 04:01 AM

    Error No " 5337 "

    Hi All,

    After publishing my infopath form , when i click the new form in the form libray i get below error" 

    Any Suggestions Please..!

    <b>Object reference not set to an instance of an object.

    System.NullReferenceException: Object reference not set to an instance of an object.
    at SMS_Request.FormCode.FormEvents_Loading(Object sender, LoadingEventArgs e)
    at Microsoft.Office.InfoPath.Server.SolutionLifetime.FormEventsHost.<>c__DisplayClass6.<>c__DisplayClassa.<add_Loading>b__3()
    at Microsoft.Office.InfoPath.Server.Util.DocumentReliability.InvokeBusinessLogic(Thunk thunk)
    at Microsoft.Office.InfoPath.Server.SolutionLifetime.FormEventsHost.<>c__DisplayClass6.<add_Loading>b__2(Object sender, LoadingEventArgs e)
    at Microsoft.Office.InfoPath.Server.SolutionLifetime.FormEventsHost.<>c__DisplayClass34.<FireLoadingEvent>b__30()
    at Microsoft.Office.InfoPath.Server.DocumentLifetime.OMExceptionManager.CallFormCodeWithExceptionHandling(UserMessages userMessages, OMCall d)

    An entry has been added to the Windows event log of the server.
    Log ID:5337 </b>

    Thanks

    MAK

  • 11-29-2010 06:44 AM In reply to

    Hi MAK,

    Need more info:

    • Do you have code in your form? Seems like you might.
    • What is the OnLoad code?
    • Have you checked the IPFS server logs? Only relevant if your form is a browser-based form.

    More soon,

    Patrick Halstead
    Project Manager at Qdabra
  • 11-29-2010 07:00 AM In reply to

    Hi Partrick,

    waiting for your reply.

    1)below is the  FormEvent_Loading code :

    XPathNavigator root1 = MainDataSource.CreateNavigator();

    SPSite site = new SPSite("http://srv-hq-itd-tmp1/");

    SPWeb web = site.OpenWeb(); SPList list = web.Lists["ListFolders"];

    SPFolder folder = list.RootFolder;

    SPQuery query = new SPQuery();

    query.Folder = folder;

    SPListItemCollection itemcoll = list.GetItems(query);foreach (SPListItem item in itemcoll)

    {

    string name = item.Folder.Name;

    string value = item.Folder.Name;

    root1.SelectSingleNode("/my:myFields/my:leftListSelectedItem", NamespaceManager).SetValue(name);

    root1.SelectSingleNode("/my:myFields/my:leftListSelectedItem", NamespaceManager).SetValue(value);

    AddLeftListItem(name, value);

    }

    DeleteLeftListitem("");

     

    string userName = this.Application.User.UserName;

    DirectorySearcher search = new DirectorySearcher(new DirectoryEntry(LDAP://domainname, @"xyz\sharepoint", "password", AuthenticationTypes.Secure), "(sAMAccountName=" + userName + ")");

    SearchResult result = search.FindOne();

    string Department = "";

    string Manager = "";

    DirectoryEntry employee = result.GetDirectoryEntry();

    XPathNavigator root2 = MainDataSource.CreateNavigator();

     

    try

    {

    Department = employee.Properties[
    "Department"].Value.ToString(); Manager = employee.Properties["Manager"].Value.ToString();

    //managerEmail = result.Properties["mail"][0].ToString();

    root2.SelectSingleNode("/my:myFields/my:txt_Department", NamespaceManager).SetValue(Department);root2.SelectSingleNode("/my:myFields/my:txt_manager", NamespaceManager).SetValue(Manager);

    }

    catch (Exception ex)

    {

    root2.SelectSingleNode(
    "/my:myFields/my:txt_Department", NamespaceManager).SetValue(ex.Message);

    // root1.SelectSingleNode("/my:myFields/my:field3", NamespaceManager).SetValue(FirstName);

    }

     

    2) What is IPFS Server Log, Where i have to check this log files ?

    My Form is Browser -based form .

    thanks

    mak. 

     

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.