Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sid 1 post 21 karma points
    Mar 25, 2011 @ 13:30
    Sid
    0

    Insert Data Data Sources Table

    Hi,

    I am getting problem insert the data into Datasource table.

    I have created 3 Datasources. 1. Customer 2. Employee 3. Teams

    1. Created Employee form using Data Srouces Create form. Whenever add the employee it stores into database.

    2. I need to create customer form. But i have to add extra field. due to limited edit possibilities, I created form based on Customer Datasoruce and export  in to UDF format. Then I have created another customer form based on UDF Form and added extrafield called TeamID.

    3. My goal is I need to insert data into Customer and insert teamid, customerid in Team datasource.

    4. So I assigned to in Workflowexecutionstatus   on submitted:

    I asigned datasource

      e.Form.DataSource = new Guid("524a43d4-8376-4fc6-ad85-a0ba7c71edd0");
                  

                e.Form.AllFields[0].DataSourceFieldKey = e.Form.AllFields[0].ToolTip;
                e.Form.AllFields[1].DataSourceFieldKey = e.Form.AllFields[1].ToolTip;
                e.Form.AllFields[2].DataSourceFieldKey = e.Form.AllFields[2].ToolTip;
                e.Form.AllFields[3].DataSourceFieldKey = e.Form.AllFields[3].ToolTip;
                e.Form.AllFields[4].DataSourceFieldKey = e.Form.AllFields[4].ToolTip;
                e.Form.AllFields[5].DataSourceFieldKey = e.Form.AllFields[5].ToolTip;
                e.Form.AllFields[6].DataSourceFieldKey = e.Form.AllFields[6].ToolTip;
                e.Form.AllFields[7].DataSourceFieldKey = e.Form.AllFields[7].ToolTip;
                 var recordStorage = new RecordStorage();
                var formStorage = new FormStorage();
                var form = e.Form;
                var recordService = new RecordService(form);
                var record1 = recordService.Record;

                 recordStorage.InsertRecord(record, e.Form);

    It is throwing null reference error.

    Now i need to insert the record into customer table. and I need to insert into Team table. Can some one help please how to store the data into datasource table.

    Please can some one help.

     

    thanks.

     

Please Sign in or register to post replies

Write your reply to:

Draft