Question
Remove or hide add button at details on mobile app
07:24 Dec 10, 2024
How to remove or hide the add (+) button on mobile?

Like
1 comments
17:34 Dec 18, 2024
Hi,
In order to hide this button in the detail you need to override a base method getAddAction in the controller, this is how it's done:
1) Create a new module, name it something like "UsrAddButtonRemove" and modify a getAddAction in it. Full code:
Ext.define("ContactGridPage.Controller", {
override: "Terrasoft.controller.BaseGridPage",
statics: {
Model: Contact
},
config: {
refs: {
view: "#ContactGridPage"
}
},
getAddAction: function() {
if (this.isDetail()){
return null;
}
return this.callParent(arguments);
}
});2) In the Manifest (MobileApplicationManifestDefaultWorkplace or other) add your customization to PagesExtensions of the needed object.
"Models": {
"Contact": {
----
"PagesExtensions": [
"UsrAddButtonRemove"
]3) Compile your configuration to make sure the added module is working properly.
In this example, a + button was hidden for a Contact object, but it can be modified for any object. Also note, that this works only on Classic UI pages, not Freedm UI.
Show all comments