AL icon indicating copy to clipboard operation
AL copied to clipboard

Actionref is not hidden, even if property 'visible' is set on false

Open Gwrsky opened this issue 2 years ago • 1 comments

Hi, I wanted to hide standard PromotedActions on page ItemCard, and replace them with my other actions. Unfortunately, it is not possible, or at least i don't know how to do it. I've written following code: image Which should hide promoted actionrefs. I've also set propety 'visible' to false on the actions itself. image Yet there's no result, actions are still visible on the page: image I Guess it's some kind of bug with property visible = false. Could you please assist?

Gwrsky avatar Jul 13 '23 10:07 Gwrsky

@Gwrsky - We tried to reproducing he issue that you mentioned on the latest preview of Business Central, and it works as expected.

This is how the action bar looks like:

image

This is the AL Code used:

pageextension 50100 MyExtension extends "Item Card"
{
    actions
    {
        modify(SalesPriceLists_Promoted)
        {
            Visible = false;
        }
        modify(PurchPriceLists_Promoted)
        {
            Visible = false;
        }
        modify(PurchPriceLists)
        {
            Visible = false;
            Enabled = false;
        }
        modify("Set Special Prices_Promoted")
        {
            Visible = false;
        }
        modify(PricesDiscountsOverview_Promoted)
        {
            Visible = false;
        }
        modify("Set Special Discounts_Promoted")
        {
            Visible = false;
        }
        modify(PurchPricesDiscountsOverview_Promoted)
        {
            Visible = false;
        }
        modify(SalesPriceListsDiscounts_Promoted)
        {
            Visible = false;
        }
        modify(PurchPriceListsDiscounts_Promoted)
        {
            Visible = false;
        }
        modify(Action86_Promoted)
        {
            Visible = false;
        }
        modify(Action85_Promoted)
        {
            Visible = false;
        }
        modify(Action85)
        {
            Visible = false;
            Enabled = false;
        }
        addlast(Category_Category6)
        {
            actionref(MyAction_Promoted; MyAction) { }
        }

        addlast(Creation)
        {
            action(MyAction)
            {
                ApplicationArea = All;
                trigger OnAction()
                begin
                    Message('Test');
                end;
            }
        }
    }
}

Are you still facing this issue? Can you try this out on the latest preview? Do you have other extensions or in-client customizations installed that are contributing to this page?

qutreson avatar Feb 28 '24 10:02 qutreson

Closing this issue as we couldn't reproduce it. If you are still experiencing it without having other extensions or in-client customizations on your environment, please log a new issue with additional information.

qutreson avatar Mar 21 '24 07:03 qutreson