Editing Business Data Using Business Data Catalog Actions and InfoPath Forms Service - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Editing Business Data Using Business Data Catalog Actions and InfoPath Forms Service

Last post 10-14-2008 07:00 PM by aniket. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-10-2008 01:29 PM

    Editing Business Data Using Business Data Catalog Actions and InfoPath Forms Service

    Hello All


    I read following article and its sample code withmy own LOB

    http://msdn.microsoft.com/en-us/library/bb852170.aspx

    I am trying to use with my own lob with item table. Here I am trying to set initially with two fields itemcd, itemdesc.

    here is my code

    XPathNavigator myNav = this.MainDataSource.CreateNavigator();  
    string id = e.InputParameters["itemcode"].ToString();  
    string firstName = e.InputParameters["itemdesc"].ToString();  
    myNav.SelectSingleNode("/my:myFields/my:itemcode", this.NamespaceManager).SetValue(itemcode);  
    myNav.SelectSingleNode("/my:myFields/my:itemdesc", this.NamespaceManager).SetValue(itemdesc);  
     

    But whenever I compile it is giving me error bor both field i.e.

    The name 'itemcode' does not exist in the current context C:\Documents and Settings\ashishk\My Documents\InfoPath Projects\form541\FormCode.cs 40 96 form54

    Please advise, has anyone implemented this?


    Ashish

     

  • 10-14-2008 06:54 PM In reply to

    Re: Editing Business Data Using Business Data Catalog Actions and InfoPath Forms Service

    With the code you have written, there is a reference to a variable called itemcode in the fifth line:
            myNav.SelectSingleNode("/my:myFields/my:itemcode", this.NamespaceManager).SetValue(itemcode);
    but there is no variable of that name. Perhaps you mean to use id for this variable?

    Also there is a similar problem with itemdesc in the last line. Do you mean to use firstName there instead?

    Tom Lawrence
    Qdabra® Software – www.qdabra.com / www.InfoPathDev.com / 877.544.2389
    The InfoPath Authority – Streamline data gathering to turn process into knowledge.™
  • 10-14-2008 07:00 PM In reply to

    Re: Editing Business Data Using Business Data Catalog Actions and InfoPath Forms Service

    Hello

    I understand your point and accordingly changed my code. Now I am able to publish the form template. I am also trying to implement same article and added "Edit Action". I published the infopath form template, and in SPS-Entity, I added a edit action like this with using different urls, but it is giving me error

    http://portal/FormServerTemplates/_layouts/FormServer.aspx?XsnLocation=http://portal/FormServerTemplates/myform54New.xsn&DefaultItemOpen=1&MyPrimaryField={0}&myCode1={1}&myIncidentNo1={2

    http://portal/FormServerTemplates/myform54New.xsn&DefaultItemOpen=1&MyPrimaryField={0}&myCode1={1}&myIncidentNo1={2

    It is giving Bed Request Error

    If I tried only http://portal/FormServerTemplates/myform54New.xsn, it will open a blank infopath form by clicking on "Edit Action" on BDC Data List.

    Anyone did this, actually I am trying to Integrate BDC "Edit Action" for an selected record and allow user to update. I dont want to user aspx form here.

    ANy Idea

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