Record Zoom Extension

Record Zoom Extension

I think we all like the Zooming in the classic client and the Help/ About This Page in the Role Tailored client. This extension I created can be easily added to any page that displays records from the database and it will show all fields included in the source table. The source code is available on Github.

I wanted to create a similar experience to the Help/About This Page but in the web client.

AboutThisPageExample

The example is available on my Github. The code shared will add a button called “Show All Fields” to the ribbon of the Customer List and the Vendor List.

CustomerList

When you click the button a new list page will appear showing all the fields and values:

ZoomPage

It’s very simple to add it to a different page, you just need to create a new page extension with the new action and then create a new event subscriber in the Zoom Management codeunit.

Page Extension Example

pageextension 50101 "Vendor List Zoom" extends "Vendor List"
{
    actions
    {
        addlast(Processing)
        {
            action("Zoom In")
            {
                CaptionML = ENG='Show All Fields',
                            ENU='Show All Fields';
                Promoted = true;
                PromotedCategory = Process;
                PromotedIsBig = true;
                Image = Database;
                ApplicationArea = All;
            }
        }
    }
}

Event Subscriber in Zoom Management

[EventSubscriber(ObjectType::Page, 27, 'OnAfterActionEvent', 'Zoom In', false, false)]
    local procedure ZoomIn_OnAfterAction_VendorList(var Rec : Record Vendor);
    begin
        ZoomIn(Rec);
    end;

The code that is creating the view of all fields is using Record References, Field References and Key References so if you are looking for an example for those check out the code on Github: COD50100_ZoomMgt.al

More information about references:

Advertisements

5 thoughts on “Record Zoom Extension

  1. Cool Extension but I think it would not work in the latest Version because the ApplicationArea is not set.

    Like

    1. Thank you for the feedback. I’ve set the property on the Actions. You can see the update in the page extension snippet in the article and on github. Best Regards,
      Marcell

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s