At directions NA MS revealed the new NAV called Dynamics 365 Tenerife. Though I am not at event but got first look from community friends.
Announcement from MS
Preview of Dynamics 365 Tenerife
Stay Tuned ….
At directions NA MS revealed the new NAV called Dynamics 365 Tenerife. Though I am not at event but got first look from community friends.
Announcement from MS
Preview of Dynamics 365 Tenerife
Stay Tuned ….
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
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…
At the moment Microsoft development tool is still evolving and getting updated day by day.
In this blog post we will see how how to create Table extension object.
The table extension allows you to add more fields or change properties on a table. Along with defining other fields,the table extension is where you can write trigger code for additional fields.
In visual studio code by typing ttableext will create basic layout for table extension object when using AL extension in Visual Studio code.
Following properties can be changed for table
How to Write Code
For example now if you would like to add one field in table and write some validation on that field then you can write as follows. In this I am adding field in Table 23 Vendor as Credit Days with datatype Integer.
tableextension 70000030 CreditDays extends Vendor { fields { field(70000900;CreditDays;Integer) { trigger OnValidate(); begin if (rec.CreditDays < 0) then begin message('Credit Days can not be blank'); end; end; } } }
Stay tuned for more and Keep updating and learning .
Cheers