Skip to Content
0

SAP WebIDE: MessageBox is not appearing after create method

Jan 24 at 04:38 PM

54

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Balaji Peethani Jan 24 at 11:04 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Hamdan Khalid Jan 24 at 08:26 PM
0

Hi Balaji,

Use the following control in your code

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

Share
10 |10000 characters needed characters left characters exceeded