Events
Power BI DataViz World Championships
Feb 14, 4 PM - Mar 31, 4 PM
With 4 chances to enter, you could win a conference package and make it to the LIVE Grand Finale in Las Vegas
Learn moreThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
For your extension to run properly, configuration and starting data such as permission sets and table data may be needed. An extension can include the following types of data that can be imported for the tenant during the installation of the extension.
The data must be exported into files to be included in the extension. To use the export functions you must use a container sandbox environment for Dynamics 365 Business Central. For more information, see Get started with the Container Sandbox Development Environment.
Open the Business Central Development Shell.
Export the relevant permission set using the Export-NAVAppPermissionSet
cmdlet to export the permission set to a file. For example, the following command exports the BASIC permission set.
Export-NAVAppPermissionSet -ServerInstance DynamicsNAV160 -Path '.\PermissionSet.xml' -PermissionSetId BASIC
Note
Export each permission set to a separate XML file.
Add the exported permission set files to the Visual Studio Code project that contains your extension.
Warning
If you do not include a permission set with your extension, only users with the SUPER permission set will be able to use the extension.
Important
With the latest version of Dynamics 365 Business Central permissions are no longer defined as data in the application database. Permissions that can be created by using AL objects are called system permissions. For more information, see Entitlements and Permission Sets Overview.
Open the Business Central Development Shell.
Export the relevant web service using the Export-NAVAppTenantWebService
cmdlet to export the web service to a file. The following command exports the Customer Card page.
Export-NAVAppTenantWebService -ServerInstance DynamicsNAV160 -Path TenantWebService.xml -ServiceName Customer -ObjectType Page -ObjectId 21
Note
Export each web service to a separate XML file.
Add the exported web services files to the Visual Studio Code project that contains your extension. An exported web service XML file looks like the following:
<?xml version="1.0" encoding="utf-8"?>
<ExportedData>
<TenantWebServiceCollection>
<TenantWebService>
<ObjectType>Page</ObjectType>
<ObjectID>21</ObjectID>
<ServiceName>Customer</ServiceName>
<Published>true</Published>
</TenantWebService>
</TenantWebServiceCollection>
</ExportedData>
You may also merge multiple XML files into one:
<?xml version="1.0" encoding="utf-8"?>
<ExportedData>
<TenantWebServiceCollection>
<TenantWebService>
<ObjectType>Page</ObjectType>
<ObjectID>21</ObjectID>
<ServiceName>Customer</ServiceName>
<Published>true</Published>
</TenantWebService>
<TenantWebService>
<ObjectType>Page</ObjectType>
<ObjectID>26</ObjectID>
<ServiceName>Vendor</ServiceName>
<Published>true</Published>
</TenantWebService>
</TenantWebServiceCollection>
</ExportedData>
Open the Business Central Development Shell.
Export the relevant data using the Export-NAVAppTableData
cmdlet to export the data to a file. This includes setting the path to a folder where you want the .navxdata file created. A data file in the format of TAB<TABLEID>.navxdata
will be created. (Example: TAB10000.navxdata).
Export-NAVAppTableData -ServerInstance DynamicsNAV160 -Path 'C:\NAVAppTableData' -TableId 10000
Note
Export the data for each table to a separate XML file.
Add the exported table data files to the Visual Studio Code project that contains your extension.
Call the procedure in a Codeunit with the Subtype property Install
or Upgrade
and specify the table ID in the NavApp.LoadPackageData
procedure as shown in the following example.
codeunit 50100 MyExtensionUpgrade
{
Subtype = Upgrade;
trigger OnUpgradePerDatabase()
begin
NavApp.LoadPackageData(50100);
end;
}
Warning
An extension can only include table data for new tables that are added as part of the extension.
Open the Business Central Development Shell.
Export the relevant report layouts using the Export-NAVAppReportLayout
cmdlet to export to a file:
Export-NAVAppReportLayout -ServerInstance DynamicsNAV160 -Path .\ReportLayout.xml -LayoutId 1
Note
Export each custom report layout to a separate XML file.
Add the exported custom report files to the Visual Studio Code project that contains your extension.
Developing Extensions in AL
Converting Extensions V1 to Extensions V2
Writing Extension Install Code
Events
Power BI DataViz World Championships
Feb 14, 4 PM - Mar 31, 4 PM
With 4 chances to enter, you could win a conference package and make it to the LIVE Grand Finale in Las Vegas
Learn moreTraining
Module
Initialize data during extension installation in Dynamics 365 Business Central - Training
Do you want to know how to initialize data during extension installation for Microsoft Dynamics 365 Business Central? Initializing data when you're installing an extension automate many steps that you must otherwise perform manually. By automating this process, you can quickly set up an extension and it becomes more user-friendly.
Certification
Microsoft Certified: Dynamics 365 Business Central Developer Associate - Certifications
Demonstrate you have the skills to design, develop, test, and maintain solutions based on Dynamics 365 Business Central.