Question
How can i hide the [Edit] button for portal users?
Answer
setIsEditTemplateButtonVisible: function(scope) { var select = Ext.create("Terrasoft.EntitySchemaQuery", { rootSchemaName: "SysAdminUnit" }); select.addMacrosColumn(Terrasoft.QueryMacrosType.PRIMARY_COLUMN, "Id"); select.addColumn("ConnectionType"); var filters = Ext.create("Terrasoft.FilterGroup"); filters.addItem(select.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "Id", scope.Terrasoft.SysValue.CURRENT_USER.value)); select.filters = filters; select.execute(function(response) { if (response.success) { if (response.collection.getCount() > 0) { var connectionType = response.collection.getByIndex(0).get("ConnectionType"); if(connectionType === 1){ scope.set("isEditTemplateButtonVisible", false); }else{ scope.set("isEditTemplateButtonVisible", true); } } } }, this);
09:03 Mar 25, 2019
Hi S.Kobizka,
Please confirm where this code we can update?
also please guide, how to add custom button on customer portal dashboard, on click it should open create form of a oob/custom module
Regards
Show all comments