Skip to Content

Smart Template Message Control

Dec 28, 2017 at 09:11 AM


avatar image


How to change standard message as "Object Created" or "Object Saved" of Smart Template. We want to specify our own message on data save.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Iftah Peretz
Dec 31, 2017 at 12:08 PM


Can you provide working code/JSfiddle/JS bin?

This is out of context.

What do you mean by "smart template"? If you mean class sap.ui.comp.smartvariants.SmartVariantManagement you can utilize the "afterSave" event to prompt custom message to the user. But, again, I am unclear on what you are asking.

Show 5 Share
10 |10000 characters needed characters left characters exceeded

Hi Iftah,

I have created an APP using template available in SAP Web IDE.

In this App, I am getting message as "Object Created". How to change this message as 'account 10001 created'.

Or How to remove this message. so that I can add my own custom message.

capture.png (42.7 kB)


Which template (I can see it's not a worklist one)? And which (if any) tutorial did you use to create it?


Hi Iftah,

In SAP Web IDE, there is an option to select your template and to create your Fiori APP.

I am using below steps. In this process, There is no way to control the message as 'Object Created' or 'Object saved' with customer own messages.

untitled.png (29.4 kB)
capture.png (41.6 kB)

I'll tell you where am at.

In ControllerImplementation-dbg.js lines 824-826 there are these calls

} else {

Then it goes to CommonUtils-dbg.js lines 38-42

var oResourceBundle; // initialized on first use
function getText() {
oResourceBundle = oResourceBundle || oController.getOwnerComponent().getModel("i18n").getResourceBundle();
return oResourceBundle.getText.apply(oResourceBundle, arguments);

The oResourceBundle has a uri to

"../resources/sap/suite/ui/generic/template/lib/i18n/i18n", ext: ".properties"

and arguments has this (in my case - I pressed "Save")


After some "fun" code we get into Application-dbg.js where the message is fired

showMessageToast: function() {
	var myArguments = arguments;
	var fnMessageToast = function() {"Show message toast");, myArguments); //in myArguments -->"Object created"
	Promise.all([getOperationEndedPromise(true), oTemplateContract.oBusyHelper.getUnbusy()]).then(fnMessageToast);

Now, this "OBJECT_CREATED"/"OBJECT_SAVED" represents the messages you talk about and it seems to me that it is being pulled from some i118n that might be overwritten. Of course I tried putting this as an attribute of my i118n and you know what didn't happen.

Then I continued reading this and this.

I think that going further is possible, however, this is slowly killing me :) so I think I'll let you take it from here.


Hi Iftah,

Thanks for sharing detail Info. Now I will try to explore it.