Hi!, I am creating records using a modal, I am fol...
# suitecommerce
e
Hi!, I am creating records using a modal, I am following the logic on the module ProductList, however I am not sure what are the parts involved to reload/rerender the new list of records, including the new one created, do you have any idea? This is for SCA 2019.2
s
You use Backbone to either navigate to a particular route or to trigger the
showContent()
on a particular view.
In this post, when the model changes in my edit view, I trigger the list page route.
Alternatively, if you've just changed the collection or model data of the particular view you're looking at and you want to 'refresh' that, then you'll to listen to your desired event and do something like
this.showContent()
(although it'll probably have to be
self.showContent()
if you do it within the event listener)
eg
Copy code
var self = this;
this.collection.on('reset sync add remove change destroy', function() {
  self.render();
});
e
@Steve Goldberg! Thanks so much for the multiple examples and explanation! I will take a look at the article!