cancel
Showing results for 
Search instead for 
Did you mean: 

SAP WebIDE: MessageBox is not appearing after create method

balaji_vta
Participant
0 Kudos

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:

Accepted Solutions (1)

Accepted Solutions (1)

balaji_vta
Participant
0 Kudos

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" : "" }); } });

Answers (1)

Answers (1)

0 Kudos

Hi Balaji,

Use the following control in your code

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