Tag Archives: AL development

NAV Tech Days Recorded Session

NAV TechDays is the name of a conference, organized by mibuso.com. This conference meant  technical only and highly relevant – sessions, related NAV and Business Central.

NAV TechDays is the place where some of the best developers and MVP’s exchange ideas and provides more insight of NAV world (oops Business Central)

Few of the session which I think more useful for everybody which listed here on my blog and you can visit them

Practical approaches for upgrading your NAV database and moving to extensions

The future for developers and consultants

Performance: Business Central reloaded for the Cloud

What’s new in Developing for Business Central

Evolution of a titan: a look at the development of NAV from an MVP angle

Business Central: The new face of the client

Crazy mix of integrations: Dynamics 365 Business Central and Azure services

Hope you guys will find it useful 

How to record Events in Business Central

I know you all started working with AL development and extension. As you are converting your product or customization every time need to deal with base application code as during C/AL days you already added business logic in required codeunits,tables,pages etc.

Now when you are dealing with extension you need to move your customization to AL development using events subscription. It is always painful to find events associate with every business process and need to search right event to write customization did.

In business central there is feature available to see which events are executed during process you ran and one can record this events using event recorder .These events are not stored like permission set .This will disappear once you close the page.

We will see how we can use this . For recording you need to have two browser open in which one will do recording and other will execute business process.

  1. Search for Event recorder.

SearchEventR

2. Click On Event recorder which will show as below

EventScreen

3. Click on Record Events–> Start

EventStart

Go to another browser and start executing the required process . In this example I am creating one purchase order

PurchaseOrder

Now go back first browser and click on record Events–>Stop

StopEvents

Once you click ‘Yes’ then it will display all events executed during purchase order creation.

EventRecorded

Go to the last columns i.e. Get AL Snippets where you will get AL code for the events

Snippets

This will really helpful while moving your program to AL from C/AL

Too Cool.

Stay tuned for more updates.

 

 

Business Central :Code Unit 1 Retired

 

15Though we are eagerly waiting for October 2018 Business central on-premise version and meanwhile we have news that Codeunit 1 (Application Management ) has been retired and new system events has been introduced in 2 billion range.

This has been refactor to cope up with new development environment .so  henceforth you will not find Codeunit 1 in object designer.

Whenever database is created these special codeunits will be created automatically. As well as they will not contain event instead of code.

Following functions become events

 

Codeunit 1 function name
New Object Type
New Object ID
New function name
CompanyOpen
Codeunit
40
CompanyOpen
GetSystemIndicator
Codeunit
40
GetSystemIndicator
CompanyClose
Codeunit
40
CompanyClose
FindPrinter
Codeunit
44
GetPrinterName
ApplicationVersion
Codeunit
9015
ApplicationVersion
CustomApplicationVersion
N/A
N/A
N/A
ReleaseVersion
Codeunit
9015
ReleaseVersion
ApplicationBuild
Codeunit
9015
ApplicationBuild
CustomApplicationBuild
N/A
N/A
N/A
ApplicationLanguage
Codeunit
43
ApplicationLanguage
DefaultRoleCenter
Codeunit
9170
DefaultRoleCenterID
MakeDateTimeText
Codeunit
41
MakeDateTimeText
GetSeparateDateTime
Codeunit
41
GetSeparateDateTime
MakeDateText
Codeunit
41
MakeDateText
MakeTimeText
Codeunit
41
MakeTimeText
MakeText
Codeunit
41
MakeText
MakeDateTimeFilter
Codeunit
41
MakeDateTimeFilter
MakeDateFilter
Codeunit
41
MakeDateFilter
MakeTextFilter
Codeunit
41
MakeTextFilter
MakeCodeFilter
Codeunit
41
MakeTextFilter
MakeTimeFilter
Codeunit
41
MakeTimeFilter
AutoFormatTranslate
Codeunit
45
AutoFormatTranslate
ReadRounding
Codeunit
45
ReadRounding
CaptionClassTranslate
Codeunit
42
CaptionClassTranslate
GetCueStyle
Codeunit
9701
GetCueStyle
SetGlobalLanguage
Codeunit
43
SetGlobalLanguage
ValidateApplicationlLanguage
Codeunit
43
ValidateApplicationLanguage
LookupApplicationlLanguage
Codeunit
43
LookupApplicationLanguage
GetGlobalTableTriggerMask
Codeunit
49
GetGlobalTableTriggerMask
OnGlobalInsert
Codeunit
49
OnGlobalInsert
OnGlobalModify
Codeunit
49
OnGlobalModify
OnGlobalDelete
Codeunit
49
OnGlobalDelete
OnGlobalRename
Codeunit
49
OnGlobalRename
GetDatabaseTableTriggerSetup
Codeunit
49
GetDatabaseTableTriggerSetup
OnDatabaseInsert
Codeunit
49
OnDatabaseInsert
OnDatabaseModify
Codeunit
49
OnDatabaseModify
OnDatabaseDelete
Codeunit
49
OnDatabaseDelete
OnDatabaseRename
Codeunit
49
OnDatabaseRename
OnDebuggerBreak
Codeunit
9500
ProcessOnDebuggerBreak
LaunchDebugger
Codeunit
9500
OpenDebugger
OpenSettings
Codeunit
9170
OpenSettings
OpenContactMSSales
Codeunit
50
OpenContactMSSales
InvokeExtensionInstallation
Codeunit
2501
InvokeExtensionInstallation
CustomizeChart
Codeunit
9180
CustomizeChart
HasCustomLayout
Codeunit
44
HasCustomLayout
MergeDocument
Codeunit
44
MergeDocument
ReportGetCustomRdlc
Codeunit
44
ReportGetCustomRdlc
ReportScheduler
Codeunit
44
ScheduleReport
OnBeforeOpenSettings
Codeunit
9170
OnBeforeOpenSettings
OnAfterGetApplicationVersion
Codeunit
9015
OnAfterGetApplicationVersion
OnBeforeCompanyOpen
Codeunit
40
OnBeforeCompanyOpen
OnAfterCompanyOpen
Codeunit
40
OnAfterCompanyOpen
OnRoleCenterOpen
Codeunit
9170
OnRoleCenterOpen
OnBeforeCompanyClose
Codeunit
40
OnBeforeCompanyClose
OnAfterCompanyClose
Codeunit
40
OnAfterCompanyClose
OnAfterGetSystemIndicator
Table
79
OnAfterGetSystemIndicator
OnAfterFindPrinter
Codeunit
44
OnAfterGetPrinterName
OnAfterGetDefaultRoleCenter
Codeunit
9170
OnAfterGetDefaultRoleCenter
OnAfterMakeDateText
N/A
N/A
N/A
OnAfterMakeTimeText
N/A
N/A
N/A
OnAfterMakeText
N/A
N/A
N/A
OnAfterMakeDateTimeFilter
Codeunit
41
OnAfterMakeDateTimeFilter
OnAfterMakeDateFilter
Codeunit
41
OnAfterMakeDateFilter
OnAfterMakeTextFilter
Codeunit
41
OnAfterMakeTextFilter
OnAfterMakeCodeFilter
N/A
N/A
N/A
OnAfterMakeTimeFilter
Codeunit
41
OnAfterMakeTimeFilter
OnAfterAutoFormatTranslate
Codeunit
45
OnAfterAutoFormatTranslate
OnAfterCaptionClassTranslate
Codeunit
42
OnAfterCaptionClassTranslate
OnAfterGetGlobalTableTriggerMask
Codeunit
49
OnAfterGetGlobalTableTriggerMask
OnAfterOnGlobalInsert
Codeunit
49
OnAfterOnGlobalInsert
OnAfterOnGlobalModify
Codeunit
49
OnAfterOnGlobalModify
OnAfterOnGlobalDelete
Codeunit
49
OnAfterOnGlobalDelete
OnAfterOnGlobalRename
Codeunit
49
OnAfterOnGlobalRename
OnAfterGetDatabaseTableTriggerSetup
Codeunit
49
OnAfterGetDatabaseTableTriggerSetup
OnAfterOnDatabaseInsert
Codeunit
49
OnAfterOnDatabaseInsert
OnAfterOnDatabaseModify
Codeunit
49
OnAfterOnDatabaseModify
OnAfterOnDatabaseDelete
Codeunit
49
OnAfterOnDatabaseDelete
OnAfterOnDatabaseRename
Codeunit
49
OnAfterOnDatabaseRename
OnAfterHasCustomLayout
Codeunit
44
OnAfterHasCustomLayout
OnAfterReportGetCustomRdlc
Table
9650
OnAfterReportGetCustomRdlc
OnBeforeOnDatabaseInsert
Codeunit
49
OnBeforeOnDatabaseInsert
OnBeforeOnDatabaseModify
Codeunit
49
OnBeforeOnDatabaseModify
OnBeforeOnDatabaseDelete
Codeunit
49
OnBeforeOnDatabaseDelete
OnBeforeOnDatabaseRename
Codeunit
49
OnBeforeOnDatabaseRename
OnEditInExcel
Codeunit
6710
OnEditInExcel
OnInstallAppPerDatabase
N/A
N/A
N/A
OnInstallAppPerCompany
N/A
N/A
N/A
OnCheckPreconditionsPerDatabase
Codeunit
9900
OnCheckPreconditionsPerDatabase
OnCheckPreconditionsPerCompany
Codeunit
9900
RaiseOnCheckPreconditionsPerCompany
OnUpgradePerDatabase
Codeunit
9900
OnUpgradePerDatabase
OnUpgradePerCompany
Codeunit
9900
OnUpgradePerCompany
OnValidateUpgradePerDatabase
Codeunit
9900
OnValidateUpgradePerDatabase
OnValidateUpgradePerCompany
Codeunit
9900
OnValidateUpgradePerCompany

Stay Tuned for more….

 

Setup Visual Studio Code for local NAV server Installation

In this section we will see how do we setup Visual studio code locally on NAV 2018 server.

Hereby I assume that NAV 2018 is already installed on local machine .

You can download Visual studio code from Visual Studio Code

After Installing NAV 2018 and Visual Studio Code follow following steps to enable Visual studio code for writing extension and AL code.

  1. Enable Developer Service endpoint from NAV server instance

Developer End Point

2) Setup Web Client Base URL

Mention the web client url address .for example :- http://localhost:8080/dynamicsnav110/

WebClientURL

Once all changes done in service then restart the service.

3) Open Visual studio code and Install VSIX file from media 

InstallVSIX

You will find .vsix file in NAV 2018 Media file in folder ..\NAV.11.0.22292.W1.DVD\ModernDev\program files\Microsoft Dynamics NAV\110\Modern Development Environment\ALLanguage.Vsix

This will install AL language in visual studio code

4) Press CTRL+SHIFT+P and select command AL:GO in order to select a location and create a folder with default file of an extension

5) Setup Launch .JSON file

JSOn

Change server instance to DynamicsNAV110 and authentication to Windows

6) Press CTRL+SHIFT+P  and use command to download symbols AL:Download Symbols

7) Pres CTRL+F5 to publish the Helloworld.AL extension which extends customer list page and same id is mention in startupobjectid parameters of launch .json file

AL1

Once publish you will get following in web client

2

Get ready for extension development with this….

Cheers…

 

 

 

 

Dynamics 365 Business Central : How to Search for Pages/report

How to enable the navigational  support for the page or report from search option on Business central

AL provides property called as UsageCategory which can be used to enable the search for page or report through search in Business central. If the UsageCategory property not defined then it will not available in search

Following are the property values which one can define in AL

  • None
  • Lists
  • Tasks
  • ReportsAndAnalysis
  • Documents
  • History
  • Administration

usage