Show alert massage after record save

Hi There,

I am looking to trigger alert box after record save at record creations time.

elf.initiateSave(_.bind(function initSave() {
                    if (self.closestComponent('drawer')) {
                        app.alert.show('or_copied123', {
                            level: 'success',
                            messages: 'this the message',
                            autoClose: false
                        });
                        app.drawer.close(self.context, self.model);
                        app.alert.dismiss('or_copied123');
                    }
                }, self));
I tried 'saveAndClose': function()  in create js but it't not working.  Please suggest me any way to achieve this. is there any way to show alert message showing only after the record save.  
Parents
  • Hi Sandeep,

    Did you tried calling the function after save button click as mentioned below. If not can you please try using as below by placing your function name in place of saveClicked in the below line.

    this.context.on('button:save_button:click', this.saveClicked, this);
    And please go through this link to know more about Alerts in SugarCRM.
    Hope this information helps you.:)
    Thanks and Best Regards,
    PK,
    www.bhea.com
Reply
  • Hi Sandeep,

    Did you tried calling the function after save button click as mentioned below. If not can you please try using as below by placing your function name in place of saveClicked in the below line.

    this.context.on('button:save_button:click', this.saveClicked, this);
    And please go through this link to know more about Alerts in SugarCRM.
    Hope this information helps you.:)
    Thanks and Best Regards,
    PK,
    www.bhea.com
Children
No Data