Skip to Content
0
Jul 12, 2022 at 11:50 PM

How do I add conditions to an action button so that it doesn't appear on "Create" page?

481 Views

We have an action on the object details page that is always present even on the "Create" object page. But the action is not applicable until the new object is saved and active.

        {
            $Type  : 'UI.DataFieldForAction',
            Action : 'AdminService.customAction',
            Label  : '{i18n>CustomAction}',
        },

We would like this action to be hidden or disabled when the object doesn't exist yet. How can I accomplish this? We may also want to disable an action on existing objects if certain conditions are not met.