Quantcast
Channel: Dynamics 365 Business Central/NAV User Group
Viewing all articles
Browse latest Browse all 11285

Blog Post: Page Extension -Tenerife Visual Studio Code

$
0
0
In previous post  Table Extension  we saw how to extend table using Tenerife (New NAV development tool) .In this blog post we will see how to extend Pages using visual studio code. The page objects extends a dynamics NAV page object .This will used for add or overrides the functionality.The structure of page is divided into three parts First part contains metadata for the entire page Second part describes visual parts on page Final Part describes action published on page In visual studio typing tpageext will create the basic layout for page object when using AL extension in Visual Studio code.   How to Write Code   For example if you would like to add the custom field and Action button then you can wrtie code as follows. pageextension 70000030 VendorCardExtension extends "Vendor Card" { layout { addlast(General) { field("Credit Days"; CreditDays) { CaptionML = ENU='CreditDays'; trigger OnValidate(); begin if CreditDays < 0 then Error('Credit Days Can not be blank'); end; } } } actions { addlast(Creation) { group(MyActionGroup) { Action(MyAction1) { trigger OnAction(); begin Message('Action Button is operating'); end; } } } } } Keep Learning and Stay tuned for more updates… Cheers…

Viewing all articles
Browse latest Browse all 11285

Trending Articles