You need to sign in to do that
Don't have an account?
Jacob Chambers
Disable Modals/Popups in lightning
Anyone know of a way to disable or customize the text of the modals/popups that appear in Lightning when a record is saved or stage is changed, etc.?
The standard labels are loaded from a hard coded list in javascript (Aura).
var auraConfig = { ... "MobileWebRecordActions":{"ToasterMessageDelete":"{0} {1} was deleted.","AdditionalRecordActions":"Additional Record Actions","ToasterMessageCreate":"{0} {1} was created.","ToasterMessageUpdate":"{0} {1} was saved.","ToasterMessageCreateWithoutName":"{0} was created.","ToasterMessageMassQuickActionUpdate":"{0} actions were completed."},"SelectElement":{"Required":"--None--"},"Error":{"toastTitleGenericLabelForRecord":"You encountered some errors when trying to save this record","selectAStage":"Select a {0}","toastTitle":"You encountered some errors when trying to save \"{0}\"" .... }
You can access these "system" values but you cannot change them.
$A.set("$Label.MobileWebRecordActions.ToasterMessageUpdate","{0} {1} a été sauvé");You cannot change this value with a $A.set in the javascript lightning controller.
http://documentation.auraframework.org/auradocs#reference?topic=api:$A
The standard labels should appear in the translation workbench ( Setup > Translation Workbench > Translate ) but that doesnt exist either..
These standard "toaster message" cannot be deactivated either.
A workaround would be to "capturing" the events ( https://github.com/forcedotcom/LightningTestingService/issues/39 )
But if a "toaster message" is fired, it will be shown whatever happens.