AnsweredAssumed Answered

How can I refresh the record view after I run a new action from record menu?

Question asked by frinaldi on Oct 29, 2014
Latest reply on May 20, 2016 by Emil Maran
Hello,

I create a new action menu from account record menu ; this menu run a synchronization process that copy data to an external system.
At the end of the process, my sugar webservice update the record to define or change some fields value (ie the last synchronization date, the last synchronization status etc.).

How can I refresh only the record (not the subpanels and the intelligence pane) at the end of my process (when the action give the feedback and I display my alert message "synchronization complete").



({
         extendsFrom: 'RecordView',
         totalContactsJSON: {},

         initialize: function(options) {
                 app.view.invokeParent(this, {type: 'view', name: 'record', method: 'initialize', args:[options]});

                 // add listener for the custom button
                 this.context.on('button:my_synchro_button:click', this.my_synchro, this);
         },

         my_synchro: function() {
                 var beanId = this.model.get('id');
   app.api.call('GET', app.api.buildURL(this.module + '/' + beanId + '/my_synchro'), null, {                
                         success: function(data) {
                                 app.alert.show("server-sucess", {
                                         level: 'success',
                                         messages: 'Congratulation',
                                         autoClose: false
                                 });

                                 //HOW CAN I REFRESH THE VIEW ? RENDER() ? _RENDER() ?
                                 return true;
                         },
                         error: function(error) {
                                 app.alert.show("server-error", {
                                         level: 'error',
                                         messages: 'ERR_GENERIC_SERVER_ERROR',
                                         autoClose: false
                                 });
                                 app.error.handleHttpError(error);
                         }
                 });
         }
})


Many thanks,
Fred

Outcomes