remove row from model without flagging for deletion and saving.

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I am working on a skuid page that creates many new salesforce objects at once. This was started before the functionality that was just added to roll back data on an error, so I am using an apex webservice. I have a row in a table that I wish to remove during a snippet triggered by flagging a row for deletion. Is there a way to remove that row from visibility and the model it's on without saving the model? Thanks.
Photo of Michael Tubbs

Michael Tubbs

  • 196 Points 100 badge 2x thumb

Posted 4 years ago

  • 1
Photo of J.

J., Official Rep

  • 7,470 Points 5k badge 2x thumb
Michael,

I think that the abandonRow prototype method of skuid.model.Model would work for this. Tables listen for changes on their models, so once that row drops out of the model, it should drop out of the table too.
Photo of Michael Tubbs

Michael Tubbs

  • 196 Points 100 badge 2x thumb
Thanks J, I'll give it a try!
Photo of J.

J., Official Rep

  • 7,470 Points 5k badge 2x thumb
Sure thing! Let us know how it goes and thanks for being a part of our community!
Photo of Michael Tubbs

Michael Tubbs

  • 196 Points 100 badge 2x thumb
It worked great. Really looks good on the page having the rows disappear without needing any confirmation from the user.
Photo of Kalyan Kuchi

Kalyan Kuchi

  • 176 Points 100 badge 2x thumb
Hi Michael,

How did you make the js run on the model load?

KR
Photo of Kalyan Kuchi

Kalyan Kuchi

  • 176 Points 100 badge 2x thumb
I figured it out. Thank you!!
Photo of Rahul

Rahul

  • 542 Points 500 badge 2x thumb
Hi Kalyan,

Could you please let me know how you have deleted the rows from Model. I want to remove a row from Model where row field consist a field with null value. Would be appreciated if some one could help me out here ....