cancel
Showing results for 
Search instead for 
Did you mean: 

SAP WebIDE: MessageBox is not appearing after create method

01-24-2018 5:38 PM
balaji_vta Participant
675 views 2 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

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:

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

balaji_vta
Participant
0 Likes

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)

Former Member
0 Likes

Hi Balaji,

Use the following control in your code

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