How to change the color of particular error message which is used in suite script.

By using this Methode if their multiple error message we can change color for the particular message by extending the GlobalView message

By extending GlobalViewsMessageView we can show the color only for that message

<div class="text" style="

color: green;

"> You already have an account with same email and password in other subsidiary try with new password. </div>

_.extend(GlobalViewsMessageView.prototype, {

getContext: _.wrap(GlobalViewsMessageView.prototype.getContext, function(fn) {

var context = fn.apply(this, _.toArray(arguments).slice(1));

context.message = _.unescape(this.options.message);

return context;

})

});

Leave a comment

Your email address will not be published. Required fields are marked *