Issue related with a!writeToDataStoreEntity() function in interface level

Hi,

I have 2 forms in my application and I'm using one CDT for both the forms. I've used a!writeToDataStoreEntity() function  in submit button for storing the data. Once If I click on the submit button one row is inserting into the database.For the second form, If I click on the submit button a separate row is inserting instead of updating within the same row, the same issue is persisting with the other forms also.

Can you please suggest me to resolve this issue.

 

 

Even If I remove the a!writeToDataStoreEntity() function on second form and write the data using smart service then also new row is inserting. Its not updating with the existing row.

Thank you in advance!

 

 

Thanks,

Dharma

  Discussion posts and replies are publicly visible

Parents
  • Hi Dharma, Once the data is written in DB, on click to the first submit button, you will have to save the fv!storedValues of function a!writetodatastoreentity to the variable, so that the primary key value in db will be updated in the variable. onsuccess parameter of a!writetodatastoreentity function allows you can save the fv!storedvalues to the variable which you are using to update the data. hope this helps.
Reply
  • Hi Dharma, Once the data is written in DB, on click to the first submit button, you will have to save the fv!storedValues of function a!writetodatastoreentity to the variable, so that the primary key value in db will be updated in the variable. onsuccess parameter of a!writetodatastoreentity function allows you can save the fv!storedvalues to the variable which you are using to update the data. hope this helps.
Children
No Data