Clarification on a!writeToDataStoreEntity

My data table has 5 columns with data. In the UI i am rendering only 2 fields to edit i an editable grid. While saving it overwrites the other field values as null. Is this an expected behavior ?How to avoid it ? I want to retain the value in the fields that are not brought to the UI at all.

  Discussion posts and replies are publicly visible

Parents Reply
  • Hello Nihar,

    I don't see any use of crating the new CDT, you are saying that your table has 5 columns so your CDT will also have 5 fields, even though you don't want to display the other 3 column data, will be fine, however you make query call for all set of data and edit only those you are require to edit, say, your CDT has data as (1, Apple, Mango, Orange, Banana), you just edit Apple and Mango and let the other values to be present in other column. Once you update the value as {Cricket, Hockey} your CDT will be as (1, Cricket, Hockey, Orange, Banana). So when you will write to DB, it will not nullify the data.

    Regards,
    Ravi
Children