AnsweredAssumed Answered

Load the drawer after all the data set in is saved

Question asked by Roland Cadavos on Jun 22, 2016
Latest reply on Aug 22, 2016 by Alan Apter

I have this code but the first click on event doesnt fetch the collection. If i cancel the drawer and click again, till then the data has been loaded.


             var locationsget ='Location');

             var requestget = locationsget.fetch({"filter": [{'address_postalcode_c':postalcode_val}]});

             var locationset ='Location');


                            if (_.isEmpty(data.records)){

                                for (var i=0; i< mydata.length; i++){


                                        // my external data is set here. no problem with this



                                        success:function() {console.log('success_save');},

                                        error:function() {console.log('error');}





                               layout: 'selection-list',

                               context: {

                                    module: 'Location',

                                    collection: locationsget,

                                    filterOptions: {auto_apply:false},





The first collection is triggered before all the .save() data is successfully saved. Any help will do.