Hello Team,

Is there any possibility to hide/disable Close button rendered in Auto-generated page on standard ?

Alternatively we are looking possibility to handle this event after click (eg. go to terminate process).

Regards,

Marcin Kott

Like 0

Like

2 comments
Best reply

It's possible to hide "Close" button by applying custom CSS style to the AutoGeneratedPageV2 schema. In this way you need to find the correct selector for "Close" button in AutoGeneratedPageV2.

The article by the link below describes how to add custom CSS:

https://community.creatio.com/articles/how-add-or-edit-css-style

I would recommend to use the Pre-Configured page instead of the Auto-generated page. You can decide which buttons display to the user. You can use conditions in the process based on the button the user clicks in the Pre-Configured page. 

It's possible to hide "Close" button by applying custom CSS style to the AutoGeneratedPageV2 schema. In this way you need to find the correct selector for "Close" button in AutoGeneratedPageV2.

The article by the link below describes how to add custom CSS:

https://community.creatio.com/articles/how-add-or-edit-css-style

Show all comments

Hi Community,

Any idea how I can hide the Actions and Tag button in section. I want to hide these buttons based on Curent user role

 

Like 0

Like

3 comments

Hello Fulgen,



To check user rights you can use esq. For example:

getUserRights: function() {

    var scope = this;

 

 var currentUser = Terrasoft.SysValue.CURRENT_USER.value;

 var sysAdmins = ConfigurationConstants.SysAdminUnit.Id.SysAdministrators;

 var esq = Ext.create("Terrasoft.EntitySchemaQuery", { rootSchemaName: "SysUserInRole" });

 esq.addColumn("SysRole");

 esq.addColumn("SysUser");

 esq.filters.add("SysUser", Terrasoft.createColumnFilterWithParameter(

  Terrasoft.ComparisonType.EQUAL, "SysUser", currentUser));

 esq.filters.add("SysRole", Terrasoft.createColumnFilterWithParameter(

  Terrasoft.ComparisonType.EQUAL, "SysRole", sysAdmins));

 esq.getEntityCollection(function(response) {

  if (response && response.success) {

   var result = response.collection;

   var isSysAdmin = (result.collection.length !== 0);

   scope.set("isSysAdmin", isSysAdmin);

  }

  scope.loadMenu();

 }, this);

},



"isSysAdmin": {

          "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,

          "dataValueType": Terrasoft.DataValueType.BOOLEAN,

          "value": false

        },







Actions button is located in BaseSectionV2 schema. You can hide it by overriding the element in the desired schema. For example here I hid it in AccountSectionV2: define("AccountSectionV2", [], function() {

    return {

        entitySchemaName: "Account",

        details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,

        diff: /**SCHEMA_DIFF*/[

            {

                "operation": "merge",

                "name": "SeparateModeActionsButton",

                "values": {

                    "visible": false

                }

            }]/**SCHEMA_DIFF*/,

        methods: {}

    };

});



Tag button is added in QuickFilterV2 schema. To remove it, you should debug the schema that I mentioned to understand how this button is added. Basically, you may simply remove rights on the tag object, so users will be unable to choose tags when click on the tag button. 



Regards,

Alex

 

Alex_Tim,

Hi Alex thanks for your reply, how about hiding Actions button in edit page?

 

Fulgen Ninofranco,

Here is an example:

define("AccountPageV2", [], function() {

    return {

        entitySchemaName: "Account",

        attributes: {},

        modules: /**SCHEMA_MODULES*/{}/**SCHEMA_MODULES*/,

        details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,

        businessRules: /**SCHEMA_BUSINESS_RULES*/{}/**SCHEMA_BUSINESS_RULES*/,

        methods: {},

        dataModels: /**SCHEMA_DATA_MODELS*/{}/**SCHEMA_DATA_MODELS*/,

        diff: /**SCHEMA_DIFF*/[

            {

                "operation":"merge",

                "name":"actions",

                "values": {

                    "visible": false

                }

            }]/**SCHEMA_DIFF*/

    };

});

 

 

Show all comments