Question

New button hide in pop up

Hi Team

How to hide the new button in pop up.

hoping for a positive reply.



As I am trying in this method but it's not hiding.

Like 0

Like

5 comments

Technically it's possible but you'll need to create your own lookup control for this. It's much easier and much more correct to remove access for creating new records from the needed groups of users in the "object permissions" section.

Hi Eugene,

Please give me more information about creating own lookup control for hiding button new.

Thanks

Toan Mai,

It's possible to hide 'NEW' button by adding  "hideActions": true to the lookuplistconfig property of the attribute correspondent to lookup field.

Please find the example below:

define("AccountPageV2", [], function() {
    return {
        entitySchemaName: "Account",
        attributes: {
                "Owner": {
                        dataValueType: Terrasoft.DataValueType.LOOKUP,
                        lookupListConfig: {
                            "hideActions": true
                        
                        }
                    }
        },
        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*/[
            
        ]/**SCHEMA_DIFF*/
    };
});

It will however also hide actions drop down, but this drop down is also connected to crud operations within lookup field.

See result here:

https://prnt.sc/q62kto

Is it possible to pass this hideActions key value pair into the modal lookup window config when manually calling openLookup from the code in some way? I've tried simply adding 'hideActions: true' to the config object passed into openLookup, but it didn't seem to affect it.

Ah, have just stumbled across another post ( https://community.creatio.com/questions/what-correct-way-disable-newaction-buttons-lookup-modalbox ) which hinted at the right property - actionsButtonVisible. This can be added to the modal lookup config which is passed to openLookup with a value of false to hide the NEW and Actions buttons.

Show all comments