Risorse per professionisti IT > Home page del forum > SharePoint - Business Data Catalog (pre-SharePoint 2010) > Using Infopath Form with BDC to create database driven application
Formula una domandaFormula una domanda
 

DomandaUsing Infopath Form with BDC to create database driven application

  • mercoledì 15 ottobre 2008 21.10Hitesh Thakkar Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Hi All,

    Using BDC we can display a list of entity in BDC Data List web part and a user can see the details of a particular entity using Business Data Item web part.

    I wonder if we can use an InfoPath froms for updating and/or inserting of an entity and associate it with the BDC Data list web part as an action. Has anyone implemented a such solution?

    I have created an InfoPath form to Submit the data to a web service (to create a record of an entity) and deploy it itself using XMLFormViewer web part, and it works fine. I wonder if we can attach the InfoPath forms with BDC Data List web part and that way one could easily create CRUD (Create, Read, Update and Delete) of an entity using BDC and InfoPath together inside MOSS.

    I think MOSS is a great tool to create a Publishing Portal application, content managemment, office applications etc.. but not a good option to create a database driven application (CRUD of database entities). Please correct me if I am wrong here.

    Looking forward to answers/comments.

    Hitesh

Tutte le risposte

  • sabato 18 ottobre 2008 21.23Randy.WilliamsMVPMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Hi Hitesh,

    You have shared an interesting insight.  I agree that MOSS is great as a publishing interface, but really not really suited as an application platform on which to build full applications (in particular for read and write).  The fact that you cannot establish relationships or set other constraints on lists like you can with a database helps prove this point.

    Getting on to your question, this should be technically possible.  BDC does support write back actions, and these can be done through a web service.  It never occurred to me to link this up with InfoPath, so I don't have any experience doing it.  If this is a problem, you should still should be able to have your InfoPath invoked web service write the changes to the back-end database, and then the BDC web parts would display the latest results (since these do not cache).  If you proceed, please share your findings with us.  This would be a clever solution.
     


    Randy - http://sharepointhawaii.com/randywilliams
  • domenica 19 ottobre 2008 3.43Randy.WilliamsMVPMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Another thing that occurred to me is that your web service could also call into the BDC Object Model which would then talk to the database.  This would require a custom action created in your BDC ADF so that the change would be reflected in the database. 

    Hope this helps.
    Randy - http://sharepointhawaii.com/randywilliams
  • mercoledì 10 dicembre 2008 22.05Hitesh Thakkar Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Thanks Randy for sharing your ideas and thoughts on this. I haven't started developing the project yet. What we are implementing is the back end database SQL Server 2005 and use MOSS and ASP.Net web parts for UI. We might end up using BDC and Info path forms as well. I will share the approach once we start the project.

    PS : sorry for the late reply
  • giovedì 11 dicembre 2008 13.04pgonerA Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Hi!

    I just try to make sample solution:
    - InfoPath is getting key value from URL Parmeter and read data from web service
    - User edit data and push Submit button
    - InfoPath form save data using WebService.

    If I open separate window (http://sharepoint2k8/_layouts/formserver.aspx?xsnlocation=/formservertemplates/form.xsn&openin=browser&ID=3) it works great.

    If I embed form in XMLFormViewer, there is a problem with parameter passing. If I use arbitrary parameter name (eg. http://sharepoint2k8/PG/Work/IPTest.aspx?ID=3) i get PageNotFound exception. If I use some standard parameter names, like FilterField, my form didnt see parameters values.


    So, if I open form using fromserver, im able make all CRUD operations. If i embed form in XMLFormViever, I got only C operation :)


    Greetings
    Pawel
  • venerdì 24 aprile 2009 2.19Bally Kehal Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Hi Hitesh,
    I am interested in this solution as well . Can you share this out my email is bally at snlcorporate dot com.
    thanks
    Bally
  • domenica 3 maggio 2009 17.08Nitin Sablok Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Hi Hitesh

    The connection of BDC with Infopath to enter the details is ery much possible and I hae been on similar solution for a while now. 

    We are using BDC to fetch the records from Webserice and then we have thre types of actions defined. One is the common action which does not have any parameters and this one is called create new. the other two are item specific which pass the unique id of the id as the query string to the page where infopath form is deployed.

    On load of each infopath page we check the parameter and render the page accordingly. Once user Edit the details and press submit , details the updated in backend using webserice and user is redirectged to BDC with the fresh alues.

    Hope this helps.


  • venerdì 27 novembre 2009 7.02Hemant Kamalakar Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Hi Nitin,
    We also are using BDC to fetch the records from Webserice.
    I want to add "AddNew", "Edit" and "Delete" actions using BDC Actions.
    We are planning to use Infopath forms for "AddNew" and "Edit" action.

    How can i proceed with this?

    Regards,
    Hemant

    I am a very good fan of Microsoft Technologies. I love Programming ,and I am eager to learn New thin
  • giovedì 3 dicembre 2009 21.07Nitin Sablok Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Hi Hemant

    You will have to explore the code behind approach using Infopath forms. We can load the infopath form as a result of BDC action link click and then can write the custom code on click of submit button in infopath form to do whatever we want to do.

    Cheers
    Nitin
  • venerdì 4 dicembre 2009 1.00Wen He Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     

    Hi Hitesh,

    Randy and I have co-authored a 8-part series of articles on BDC, and the last part is Custom Action, which is what you are looking for. It's to be published very soon on SharePointMagazine.net.  If you Bing “Everything you need to know about BDC”, you will find the first 7 installments.  Please let me know if you still need this solution and I’ll post more details or entire solution here.

    Hope this helps.  Mahalo!  Wen


    Wen He (http://SharePointHawaii.com/WenHe)