Need a special offer?Find out if your project fits.
+

Bug - Update data adding and deleting records

Answered
Ilaria asked on October 17, 2020

Hi, I would like to report two bugs (possibly related to the same issue) regarding the UpdateData method with 'partial' option.

About the second one: I found that in order to reproduce the issue

Thank you in advance!
Best regards,
Ilaria

7 answers

Public
Vera Didenko Vera Didenko Flexmonster October 19, 2020

Hello, Ilaria,
 
Thank you for reaching out to us and for providing details. 
 
We have managed to reproduce the issues on our end as well. 
Our team will provide the fix to these issues in the minor release with the ETA 30th of November. 
 
Please let us know if this would work for you.
 
Kind regards, 
Vera

Public
Vera Didenko Vera Didenko Flexmonster October 20, 2020

Hello, Ilaria,
 
Looking deeper, we have noticed that in the JSFiddle examples the mapping property contains a type: "delete" field.
If this field is removed, then the issues seem to be resolved: adding and deleting records works fine.
 
We have modified two of the examples for illustration: 

  1. Re-adding a deleted record: https://jsfiddle.net/flexmonster/ys387ugd/
    Please notice that for deleting a record only the id and "DeleteRow" fields are required, for example:
    function deleteRecord() {
    this.update([{
    "RowId": "0",
    "DeleteRow": true
    }]);
    }
  2. Adding and deleting records: https://jsfiddle.net/flexmonster/8mnp1764/

 
Could you please confirm if the same works fine on your end?
As mentioned before, our team will provide the fix so that the same will work when the type: "delete" field is present (ETA November 30th). 
 
Looking forward to your reply.
 
Kind regards, 
Vera

Public
Ilaria October 28, 2020

Hi Vera, 
thank you for investigating further.
Anyway, I had the field 'DeleteRow' in the mapping object because I started using your pivot before the mapping object was implemented (the 'data model' was passed to the datasource as the very first record of the data array), and according to your documentation I had to declare a 'delete' field to have the updateData working when deleting a record. Do you confirm that this field is not needed anymore, and it is enough specifying only the Ids of the records to delete?
I further modified the two examples removing also the assignment "DeleteRow: true" and they still works, indeed.

Thank you!
Best regards,
Ilaria

Public
Vera Didenko Vera Didenko Flexmonster October 28, 2020

Hello, Ilaria, 
 
Thank you for your reply and for sharing these details. 
 
We would like to explain that by the initial design, the type: "delete" field was necessary for the partial update feature (as described in our documentation). However, while investigating the partial update issues that you've encountered, we found that without the type: delete field everything seems to work fine. The reason for this could be the changes that were introduced when the mapping object feature was added. 
 
With this in mind, we kindly suggest removing the type: delete field while our team investigates this case further. We will share the results with the ETA 30th of November. 
 
As always, please feel free to reach out to us in case further questions arise.
 
Kind regards, 
Vera

Public
Vera Didenko Vera Didenko Flexmonster December 1, 2020

Hello, Ilaria, 
 
We are happy to inform you that our team has fixed the issue with the updateData() API call and multiple update and delete calls.
 
Our team would like to mention that the type: delete field is required for deleting records:
While investigating the issue further, we found that without type: delete, the records were just set to null. This gave the impression that deleting records worked without specifying type: delete, but records were not actually getting deleted. 
 
The fix to the issues is available in the latest version of Flexmonster: https://www.flexmonster.com/release-notes/.
You are welcome to update the component
 
Please let us know if the fix works fine on your end.
Looking forward to your response.
 
Kind regards,
Vera

Public
Vera Didenko Vera Didenko Flexmonster December 8, 2020

Hello, Ilaria,
 
Our team is wondering if the update helped to resolve the issue on your end.
Does adding and deleting records work fine for you?
 
If any questions remain, please feel free to reach out.
We would be grateful for your feedback.
 
Kind regards,
Vera

Public
Vera Didenko Vera Didenko Flexmonster December 17, 2020

Hello, Ilaria,
 
Our team is wondering if you had a chance to check out the provided fix.
Does adding and deleting records work fine for you?
 
Please let us know if everything works.
 
Kind regards, 
Vera

Please login or Register to Submit Answer