Skip to Content

SAP WebIDE: MessageBox is not appearing after create method

Hi,

SAP WebIDE

I was trying to update record using create method on backend system through gateway system. Record is getting updated. But no message popup from the create method. Did I miss anything? please help me.

The code is:

code01.jpg (77.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 24 at 11:04 PM

    I was in chat with SAP and fixed the issue..

    var oThis = this;

    gModel.create("/adrch_etSet", sendNewData, { success: function() {

    var bCompact = !!oThis.getView().$().closest(".sapUiSizeCompact").length;

    MessageBox.success("Record successfully saved.",

    { styleClass: bCompact ? "sapUiSizeCompact" : "" }); },

    error: function() {

    var bCompact = !!oThis.getView().$().closest(".sapUiSizeCompact").length;

    MessageBox.alert("Record is not updated, please try later",

    { styleClass: bCompact ? "sapUiSizeCompact" : "" }); } });

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 24 at 08:26 PM

    Hi Balaji,

    Use the following control in your code

    sap.m.MessageBox.alert("Your message");

    Add comment
    10|10000 characters needed characters exceeded