Assign, Business Central, Deploy, Extension, Package, Permission, XML

Package & Deploy the Extension

This is the Nineth post in the series. If you want to go to previous post click here.

From the series of steps this post is dedicated to Step-8:

As a Eighth Step we will Package & Deploy the Extension to Business Central

Now it’s time to Build and Deploy the Extension, but before that one more step required for creating Permission Set.

I have made some modification to the file generated in above process. Below is the complete file.

Sample Permission Set

<?xml version="1.0" encoding="utf-8"?>
<PermissionSets>
  <PermissionSet RoleID="BC_DV_DEMO" RoleName="BC_DV_Demo">
    <Permission>
      <ObjectID>50120</ObjectID>
      <ObjectType>0</ObjectType>
      <ReadPermission>1</ReadPermission>
      <InsertPermission>1</InsertPermission>
      <ModifyPermission>1</ModifyPermission>
      <DeletePermission>1</DeletePermission>
      <ExecutePermission>0</ExecutePermission>
      <SecurityFilter />
    </Permission>
    <Permission>
      <ObjectID>50120</ObjectID>
      <ObjectType>1</ObjectType>
      <ReadPermission>0</ReadPermission>
      <InsertPermission>0</InsertPermission>
      <ModifyPermission>0</ModifyPermission>
      <DeletePermission>0</DeletePermission>
      <ExecutePermission>1</ExecutePermission>
      <SecurityFilter />
    </Permission>
    <Permission>
      <ObjectID>50126</ObjectID>
      <ObjectType>0</ObjectType>
      <ReadPermission>1</ReadPermission>
      <InsertPermission>1</InsertPermission>
      <ModifyPermission>1</ModifyPermission>
      <DeletePermission>1</DeletePermission>
      <ExecutePermission>0</ExecutePermission>
      <SecurityFilter />
    </Permission>
    <Permission>
      <ObjectID>50126</ObjectID>
      <ObjectType>1</ObjectType>
      <ReadPermission>0</ReadPermission>
      <InsertPermission>0</InsertPermission>
      <ModifyPermission>0</ModifyPermission>
      <DeletePermission>0</DeletePermission>
      <ExecutePermission>1</ExecutePermission>
      <SecurityFilter />
    </Permission>
    <Permission>
      <ObjectID>50121</ObjectID>
      <ObjectType>8</ObjectType>
      <ReadPermission>0</ReadPermission>
      <InsertPermission>0</InsertPermission>
      <ModifyPermission>0</ModifyPermission>
      <DeletePermission>0</DeletePermission>
      <ExecutePermission>1</ExecutePermission>
      <SecurityFilter />
    </Permission>
    <Permission>
      <ObjectID>50120</ObjectID>
      <ObjectType>8</ObjectType>
      <ReadPermission>0</ReadPermission>
      <InsertPermission>0</InsertPermission>
      <ModifyPermission>0</ModifyPermission>
      <DeletePermission>0</DeletePermission>
      <ExecutePermission>1</ExecutePermission>
      <SecurityFilter />
    </Permission>
    <Permission>
      <ObjectID>50122</ObjectID>
      <ObjectType>8</ObjectType>
      <ReadPermission>0</ReadPermission>
      <InsertPermission>0</InsertPermission>
      <ModifyPermission>0</ModifyPermission>
      <DeletePermission>0</DeletePermission>
      <ExecutePermission>1</ExecutePermission>
      <SecurityFilter />
    </Permission>
    <Permission>
      <ObjectID>50120</ObjectID>
      <ObjectType>5</ObjectType>
      <ReadPermission>0</ReadPermission>
      <InsertPermission>0</InsertPermission>
      <ModifyPermission>0</ModifyPermission>
      <DeletePermission>0</DeletePermission>
      <ExecutePermission>1</ExecutePermission>
      <SecurityFilter />
    </Permission>
  </PermissionSet>
</PermissionSets>

Build the Package & Deploy.

Permission Set will also get deployed along with Extension.

You can Assign this Permission Set to respective Users.

Now you are good to proceed with Next Step.

You can jump to Next Step from here.

Advertisement
AL Table Proxy Generator Tool, Assisted Setup, Business Central, CDS, Common Data Services, Coupling, Custom Tables, Dataverse, Deploy, Dynamics 365 Sales, Integration, Mappings, Package, Permissions, Power Apps, Scheduling, Synchronize, Testing

Integration in Business Central with Dataverse/ Common Data Services/ Dynamics 365 Sales/ Power Apps

In this post I will discuss about how we can Synchronize data to Custom Tables using Dataverse.

This post is divided in series of small posts, one post for each involved step.

You follow each post link in sequence and at end we will achieve the final Goal set in starting of this post. 

This post will walkthrough setting up an integration between a Custom table Prospects in Business Central and a Custom table Prospects in Microsoft Dataverse.

One thing important keep in mind while doing all the steps we need to use the Admin login you used to setup these environments.

Also, the Base Currency of Business Central & Dataverse Environment should be same else you will run into issue.

If the currencies of Business Central and Dataverse do not match, similar message will be displayed.

LCY Code XXX does not match ISO Currency Code XXX of the Dataverse base currency.

The Base Currency defined for Dataverse after setup is not possible to change however you can match it in Business Central by changing LCY Code in General Ledger Setup.

Let’s start with introduction to environment we are going to use, throughout the process and steps described below.

Introduction to Environment:

Before we start with the Steps Involved, let me introduce with the environment which I am going to use in this walkthrough. 

Business Central Environment:

Dynamics 365 Sale Environment:

Setup required to Connect with external system:

You can find below options in Business Central Assisted Setup.

The following are the Steps we will follow:

Follow each step above in same sequence.

For more detailed insight refer to below Microsoft Documents:

Customizing an Integration with Microsoft Dataverse

AL Table Proxy Generator

Scheduling a Synchronization between Business Central and Dataverse

Hope you enjoyed the learning by example. Wait for next post, will be back soon.

See you in next post soon with similar kind of stuffs.

Till then keep Exploring, learning and sharing with others.

BC18, Business Central, Dynamics 365, Functional Tips, How To, Information, Sales Documents, Track Package, Wave 2, What's New

Track Packages from Sales Documents in Business Central

Today in this post we will see how you to track items on shipping documents in Business Central.

I am using BC18 demo database.

Before we begin, we need to ensure our Shipping Agent is configured:

Open your Shipping agent and fill the Package Tracking URL you received from your agent.

It is obvious if agent do not provide this feature to track package from website, this will be of no use for that particular agent.

Save the changes and go to Sales Order.

Scroll to Shipping and Billing Fast Tab and fill agent details, as in above screenshot.

Next you post your shipment.

Navigate to your shipment and update tracking information you obtained from your agent.

On Posted Sales Shipment Select Process-> Update Document.

Update the Package Tracking No. you received after shipment from your agent, and save the information.

Now you can track the status of the shipment and keep informed to your customer regarding delivery status.

From Posted Shipment page select Process-> Track Package.

This will land you to the agent web page and update you about the current status of delivery.

Since we are using invalid Tracking Information, you will get your actual status if you provide valid Information.

This feature is available on other Sales Documents type too.

Hope you enjoyed the information. Will come with more similar information in my next posts. Till then keep exploring, learning and sharing your knowledge with others.

Remain safe, take care of your loved ones, put your mask, maintain safe distance and don’t forget to get vaccinated.

AL, Business Central, Development Tips, Extension Package, How To, Information, Language Module, Modern Development Tool, Multilanguage, Tip & Tricks, Translations, V2, Visual Studio Code

Enabling Multilanguage Support to Extensions – Business Central

Microsoft Dynamics 365 Business Central is Multilanguage enabled, which means that you can display the user interface (UI) in different language.

To add a new language to the extension you have built, you must first enable the generation of XLIFF files.

The XLIFF file extension is .xlf.

The support for using the ML properties, such as CaptionML and TooltipML, is being deprecated, so it is recommended to refactor your extension to use the corresponding property, such as Caption or Tooltip, which is being picked up in the .xlf file.

You can use the .xlf translation files approach only for objects from your extension.

It’s an XML-based format used to standardize localization.

Step – 1

To be able to work with translation files, you need to add a Feature to the app.json file.

Trans-1

This Feature is TranslationFile.

Step – 2

When we save our app.json file, we can see immediately that we get some warnings.

Trans-2

This warning is telling us that the Multilanguage syntax is being deprecated and that we have to update to the new syntax.

The new syntax requires us to remove all the ML properties, such as the caption ML and the option caption ML, and we have to use a regular Caption and OptionCaption properties.

We use Labels at place of Text Constants.

Trans-3

Let’s fix these issues. Any ML properties like Caption ML, Option Caption ML or Text Constants. Replace them with Caption and Label.

Before we start some important points:

  • The New translation process decouples translation from development.
  • New Label syntax – Default translation & Some attributes.
  • Translation file can be combined with the extensions to support Multilanguage.
  • Caption & CaptionML cannot be used simultaneously.
  • Label syntax have comment, locked and maxLength optional parameters.
  • Same syntax for Captions and Labels.

Here after fixing the above errors:

Trans-4

All errors resolved from my Project.

In Nutshell use only Caption, OptionCaption & Label, all translation will be done outside developer environment in xlf file, no more defining in objects.

Step – 3

Build your Package, choose AL:Package.

Trans-5

Once your Package is created error free, you will see new Folder Translations with one xlf file is created.

Every time you build your Package this file gets overwritten. So be cautious.

When you perform your translation make a copy of this file and save with new Name then perform your translation.

Means Translation task will be last process in your Extension building process.

If you add more Captions or Labels later then you will have to take care of them and populate in all of your Language translation Files.

No of Languages your extension supports, you will have that much of translation files and is packaged with your package, no separate installation like in older versions is required to enable MultiLanguage.

Step – 4

Let’s see what this xlf file looks like:

Trans-6

It is in xml format.

If you see “<file datatype=”xml”” you will get your Source-language & target-language. Source & Target is set to same Language.

“<trans-unit id” Specifies each of you Caption and Labels defined in you objects.

“<source>” node specifies Caption or Label in source Language.

You will have to add your “<target>” language translation.

Step – 5

Let make copy of this file in all the supported languages you want.

For example:

Trans-7

I have made 2 files en-US & nl-BE. Naming convention is for your understanding purpose only.

Now you can handover these files to translator and he can perform translation in required language outside your development environment.

You code/IP is safe from external agencies whom you give for translation.

Only what is required for this will be:

[1] Update your Target Language in below line as:

<file datatype=”xml” source-language=”en-US” target-language=”en-US” original=”MyFirstExtensionProject”>

To

<file datatype=”xml” source-language=”en-US” target-language=”nl-BE” original=”MyFirstExtensionProject”>

[2] For every

<source>…</source> add <target>…</target>

<source>Loadout Point</source>

<target>Loadout-punt</target>

There are number of tools available on internet which supports xlf file and give ease your work of translation.

Step – 5

Once you are done with your translation, copy all the translated file to the Translation folder and Build your Solution and deploy on Server.

Change the Language of Client to Dutch and run your Object:

Trans-8

I have translated only one caption shown in red-box.

Please read the points mentioned in the post carefully.

Now you can enable MultiLanguage support for your Extensions.

I will come up with some other topic in my future post.

Till then keep exploring and Learning. Take Care of yourself.

Corfu Navision 2016, Development Tips, Extension Package, Information, Tip & Tricks

Which Properties are Restricted in Extension Packages

For Overview, please see my earlier posts

Introducing Extensions in Microsoft Dynamics NAV 2016

Which Object types you can Include & Restrictions applicable to C/AL code in Extension Packages

Restricted Properties on Existing Page Modifications

You cannot change the values for the following properties for existing Microsoft Dynamics NAV pages in an extension.

  • AccessByPermission
  • AssistEdit
  • AutoSplitKey
  • CardPageID
  • CharAllowed
  • ContainerType
  • ControlAddIn
  • Data Type
  • DataLength
  • DateFormula
  • DelayedInsert
  • DeleteAllowed
  • DrillDown
  • DrillDownPageID
  • Editable
  • ExtendedDatatype
  • FieldClass
  • GroupType
  • ID
  • InsertAllowed
  • LinkedObject
  • Lookup
  • LookupPageID
  • MaxValue
  • MinValue
  • ModifyAllowed
  • MultipleNewLines
  • Name
  • NotBlank
  • Numeric
  • PageType
  • PartType
  • PasteIsValid
  • Permissions
  • PopulateAllFields
  • RefreshOnActivate
  • SourceExpr
  • SourceTable
  • SourceTableTemporary
  • SourceTableView
  • SubType
  • SystemPartID
  • TableRelation
  • TableType
  • TestTableRelation
  • ValidateTableRelation
  • ValuesAllowed

Most of these are typically not properties changed through customization as they can have a negative effect on the Microsoft Dynamics NAV deployment.

 

 

Restricted Properties on Existing Table Modifications

You cannot change the values for the following properties for existing tables and fields in an extension.

Table Properties Field Properties
  • Name
  • DataPerCompany
  • Permissions
  • LookupPageID
  • DrillDownPageID
  • PasteIsValid
  • LinkedObject
  • TableType
  • Name
  • AccessByPermission
  • Compressed
  • Data Type
  • DataLength
  • DateFormula
  • ExtendedDataType
  • FieldClass
  • MaxValue
  • MinValue
  • NotBlank
  • Numeric
  • Owner
  • SQL Data Type
  • SubType (BLOB)
  • TableIDExpr
  • TableRelation
  • TestTableRelation
  • ValidateTableRelation
  • ValuesAllowed Width

You can add table keys, but you cannot delete or modify existing keys.

You can add fields to a table group, but you cannot remove fields or groups.

Corfu Navision 2016, Development Tips, Events, Extension Package

Which Object types you can Include & Restrictions applicable to C/AL code in Extension Packages

For Overview, please see my earlier post Introducing Extensions in Microsoft Dynamics NAV 2016

When you create extension package you can include new as well as modified objects.

In Microsoft Dynamics NAV 2016, these object types can be added and included in an extension:

  • Pages
  • Tables
  • MenuSuites
  • Codeunits

You can modify these existing object types as permitted by your license:

  • Pages
  • Tables
  • Action Items

You will not be able to add or modify any other object types in this version.

You are not allowed to delete any existing objects.

You will also need to be sure not to modify any existing C/AL code, including code in codeunits and in triggers on existing objects.

In case you want to modify existing code, use the new C/AL eventing model.

To know more about Events see by earlier posts:

  1. Events in C/AL Navision 2016
  2. Implementing Events in Navision 2016

This restriction is only on existing code and objects. However New pages, tables, and so on, can contain C/AL code as it is considered part of the new object.

Corfu Navision 2016, Development Tips, Dynamics Content Package, How To, PowerBI.com

PowerBI.com content package for Microsoft Dynamics NAV 2016

Microsoft Dynamics NAV 2016 includes an entirely new integration with Microsoft Power BI.

In Microsoft Dynamics NAV 2016, using the new Power BI Content Pack, Microsoft Dynamics NAV end users can connect a correctly configured Microsoft Dynamics NAV instance to PowerBI.com and immediately be able to see full business performance insights in a dashboard.

The PowerBI.com content package for Microsoft Dynamics NAV 2016 empowers you to share and present data across an organization. Data can be defined centrally but be consumed, modified and presented to the local needs of users, while everybody still sees data from the same overall picture.

Benefits:

  • Business performance dashboard  Data from Microsoft Dynamics NAV is presented in an easy-to-use dashboard, providing a complete overview and important insights
  • Finance and sales insights  Users can drill into more details in the sales and finance reports, facilitating decision making
  • Personalizing the insights  Users can create a personalized dashboard from the existing KPIs and charts in reports
  • Modify and extend With this package, users can start using and exploring their own data using Power BI in just a few minutes. The dashboard gives users KPIs and charts on their sales and finance data. The setup consists of three easy steps:

Users can create their own KPIs and charts, select data from queries, set filters, select visualizations and more to create their own dashboards

  • Sign in to PowerBI.com.
  • Select the content package for Microsoft Dynamics NAV.
  • Connect a Microsoft Dynamics NAV instance to the content package. Today I will discuss about below:

It takes less than five minutes to get going! Depends upon net speed and volume of data.

Preparation:
PowerBI-1

Make sure OData Service is enabled and Port for same is defined in your Server Instance of Navision. Also you use valid thumbprint and SSL is enabled.
PowerBI-2

Check that the Page 197 Service powerbifinance is published in Web Services window. Copy the OData URL we will be requiring it while connecting to content pack for Dynamics 2016 in BI.

 

Go to PowerBI.com and sign in or go through the easy account setup process.
PowerBI-3

Sign in to Power BI using your credentials.

You first get to a page to select your data source.

The data sources are OData feeds, such as OData web services from any Microsoft Dynamics NAV solution.

  • To import your Microsoft Dynamics NAV data into Power BI, you need to have permissions to the tables where data is retrieved from, in this case sales and finance data. You sign in your account credentials.
  • The Power BI Microsoft Dynamics NAV content pack uses Microsoft Dynamics NAV’s web services to retrieve your data. If you have a lot of data in your Microsoft Dynamics NAV instance, a suggestion to minimize the impact on your web service usage is to change the refresh frequency from the current default which is once a day to only refresh on weekdays or every other day depending on your needs. Another suggestion is to have one admin create the content pack and share it with the rest of the team instead of having every admin in your organization create their own

In this case select Services to get to content packages. Refer below how to connect.
PowerBI-4

Select the content package for Microsoft Dynamics NAV.
PowerBI-5

You will be prompted to add the URL to your Dynamics NAV instance. 

An easy way to obtain this URL is in Dynamics NAV to go to Web Services, find the powerbifinance web service and copy the Odata URL, but leaving out the “/powerbifinance” from the URL string. 

When you paste in the copied URL, you must remove the last part of the web service-specific URL: “/powerbifiance” – you only need the company-specific part of it

After entering the URL You will be prompted to select an authentication method. 

Select the appropriate method and provide the relevant user credentials.
PowerBI-6

Here you provide the OData URL we saved above. Enter your Authentication Mode and provide your User ID and password to get connected to the data.

When you select Log on, it will take a few minutes for the content package to connect to your Dynamics NAV instance, get the data and create the dashboard and reports.

Troubleshooting

 

“Parameter validation failed, please make sure all parameters are valid”

If you see this error after typing your Microsoft Dynamics NAV URL. Make sure the following requirements are satisfied:

– The URL follows exactly this pattern https//instance.navserver.com:7048/DynamicsNAV90_Instance1/OData/Company(‘CRONUS%20International%20Ltd.’) replacing ” instance.navserver.com” with your NAV Server name, “DynamicsNAV90_Instance1” with your NAV Server Instance name and “Company(‘CRONUS%20International%20Ltd.’)” with your NAV Company name.

– Make sure all the letters are lower case.

– Make sure the URL is in ‘https’.

– Make sure there are no trailing forward slash at the end of the URL.

 

“Login failed”

If you get a “login failed” error after using your Microsoft Dynamics NAV credentials to login, then the account you are using doesn’t have permissions to retrieve the Microsoft Dynamics NAV data from your account. Verify it is an admin account and try again.

Let’s see what data exactly this page provides:
PowerBI-7

Depending on whether you use your own database or the demo database, the charts in the dashboard might have different content or none at all.

 New Post with details available, please check out : https://msdynamicsnavashwinitripathi.wordpress.com/2016/03/23/microsoft-power-bi-part-vi/

 

We will see rest details in my upcoming post.