Help me How to save(ADD) my work Lightswitch HTML Client RRS feed

  • Question

    1. This is my table structure SQL Database
    2. Once I save my work I'm getting this error(right side of this screen)
    3. CTC Amount which was calculated not encoded, once save the change made.

    Wednesday, March 2, 2016 3:45 AM

All replies

  • please share a sample project to us which can let us help you check what's wrong with your code.
    Friday, March 4, 2016 9:02 AM
  • Dear Mr. Andrew,

    Their is no code I just follow what beth massi was doing in the video. In the video when she press the save key in the addeditscreen example her's will be save while mine when i try it I get that error above. And also the one that i calculated not encoded it won't save also. As if my problem is how to transfer that Data from the screen(front end) to the table at the back end.

    Saturday, March 5, 2016 5:13 AM
  • Hi, 

    Pls follow the steps below

    step 1) select the columns layout press f4 select <Edit PostRender Code>

    step 2) myapp.AddEditCTCClient.columns_postRender = function (element, contentItem) {

    contentItem.findItem("ID").value = "0"; //set the value to 0 zero its an auto identity column in sql.


    try this and check it once.


    Monday, March 7, 2016 1:32 PM
  • Dear Adarsh

    I have followed the code

    myapp.AddEditCTCClient.columns_postRender = function (element, contentItem) {
        // Write code here.
        contentItem.findItem("id").value = "0"; //set the value to 0 zero its an auto identity column in sql.

    and I'm getting this Error

    CustomControl error: columns_postRender() method error: TypeError: Unable to set property 'value' of undefined or null reference

    Wednesday, March 9, 2016 8:03 AM
  • Please remove the double quotation for the zero. If you add the double quotation, it means you set a string to a ID which should be a int field. So it can't recognize this value.
    Monday, March 21, 2016 10:13 AM