05 March 2019

Dynamics 365 Business Central: Permissions required to download AL symbols

Your user needs to have the necessary permission to download AL symbols from Visual Studio Code (VSCode), else you will end up with "Could not download symbols" error in VS Code.

In order to download symbols, User needs to have SUPER permission or should have "D365 EXTENSION MGT" permission assigned. Symbols are stored per tenant and not per company, therefore Company field must be blank in either option.

Clear credentials cache in VSCode and sign in again from VS Code (Download symbols and it will ask your credentials to sign in) 
once you have the "D365 EXTENSION MGT" permission group or SUPER permission set assigned to the user, 
This time VSCode will successfully download symbols from Microsoft Dynamics 365 Business Central.


Please provide your feedback with a comment.
Thank you and Regards,
Tharanga Chandrasekara
Read more »

01 March 2019

How to check Microsoft Dynamics 365 Business Central tenant version

You can use the "System Information" page to check the current version of Microsoft Dynamics 365 Business Central tenant.

Simply search for "System Information" using "Tell me what to do" and click on the "System Information" link in the result. 

"System information" page will show the current version of the tenant. Version get change every time Microsoft upgrade the tenant.

Another way of checking the platform version is by using the admin center. 

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara
Read more »

How to access action output in Logic Apps

If you are working on Logic App to integrate Microsoft Dynamics 365 Business Central with any other third party application, by now most probably you must have used HTTP requests or custom connectors (mainly with SOAP web services). 

I saw a couple questions in the forum asking how to access action output in Logic App. 

Below JSON is copied from an action output:
 {  
  "Soap:Envelope": {  
   "@xmlns:Soap": "http://schemas.xmlsoap.org/soap/envelope/",  
   "Soap:Body": {  
    "isPostingPeriodOpen_Result": {  
     "@xmlns": "urn:microsoft-dynamics-schemas/codeunit/GenJnlPost",  
     "return_value": "false"  
    }  
   }  
  }  
 }  

What if you want to read the "return_value" field of the action output? You can use any of the below statements based on your requirement. 
  • Below statement will return the actual value or if the value is empty it will return ''
 {ActionOutputs('Compose_isPostingAllowed')?['Soap:Envelope']?['Soap:Body']?['isPostingPeriodOpen_Result']?['return_value']}   
  • Below statement will return the actual value or if the value is empty it will return null
 ActionOutputs('Compose_isPostingAllowed')['Soap:Envelope']['Soap:Body']['isPostingPeriodOpen_Result']['return_value']  

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara
Read more »

28 February 2019

Call a Microsoft Dynamics 365 Business Central function through a Web Service : SOAPAction

Today I did some work with a Logic Apps and one of the requirement was to call a Business Central function through a Web Service. 

I normally use Postman to simulate requests, export the collection and use that to create the Logic App connector. 

Codeunit which I published as a web service had few functions exposed. I wanted to call one of those functions with values passing in and read the return value. 

If I just call (POST) Web Service with the SOAP Envelope (Like below image) it will just return the WDSL. Not the result I was expecting. 

Header :

SOAP Request and Response:

However, SOAP UI return the value I was expecting it to return. 

How that can be possible?  We looked into the "HTTP log" of the SOAP UI, and we saw SOAPAction is defined and its pointing to the function I want to call. 


I did the same thing in Postman and it worked. Below is my request header and you can notice that I add "SOAPAction" to the header. 
If you didn't define the "SOAPAction" in the request header, the result will bring back the WDSL regardless of your SOAP Envelope. 
I use the postman request to create my HTTP request in Logic App. There is a much easy way of doing this in Logic App with the help of custom connector. I will share those details in another day from a new blog post. 

** Thank you Stephen Gichure for helping me to prepare this blog post.

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara
Read more »

21 February 2019

Add a logo to a Microsoft Dynamics 365 Business Central Extension


I saw a couple of forum questions about how to add a logo to an AL Extension and I thought to share a quick guide on how to. 

If you publish your new extension to Microsoft Dynamics 365 Business Central and then navigate to Extension management page, you will see your new extension as below (My extension is "Demo Extension"). 

You only need to follow a couple of simple steps to add a logo to your new extension.
1. Place the image into your Repo.
2. Refer to the image from app.json file


You can simply copy the image to any folder that you have within your workplace. I always prefer to keep things organize so I know where my .al files and other extension related files are. Therefore I will copy the logo to my res (resource) folder where I keep all my resources related to the current extension. 
Once the above step is complete, you can open the app.json file and set the logo setting to refer to the logo you just copied. Please refer below screenshot :

You might have noticed that my file path starting with ".", it means the current working folder or in my case the Repo.
Once you have the "logo" setting set in the app.json file you can simply compile and deploy the extension to Microsoft Dynamics 365 Business Central. This time it will get published with the logo.  

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara
Read more »

19 February 2019

Runtime Packages for Business Central On-Premises


Before you go through this blob, I suggest you read my blog post "Your program license does not allow you to publish" to get an understanding about the Runtime Packages. 

Runtime packages are designed to help the distribution of extensions. You can generate Runtime packages that do not contain AL code. Runtime packages allow protecting the AL source code. 


The biggest advantage to me is that extension in a runtime package can be installed on a server that does not have a developer license. In other words, you can install the runtime extension to the production without changing the customer license to a developer license. 

The license is only checked on the server where the runtime package is generated. 

How to get the runtime packages:
It is a must to install the extension into an on-premise instance to export the runtime package. next step is to connect to the instance through PowerShell and then download the runtime package. 

You can use "Get-NavAppRuntimePackage" PowerShell cmdlets do download the extension:


 Get-NAVAppRuntimePackage -ServerInstance DynamicsNAV -AppName 'Proseware SmartApp' -Version 2.3.4.500 -ExtensionPath 'Prosware SmartApp_2.3.4.500_runtime.app'   
Once you have the runtime extension you can use the Publish-NavApp and the Install-NAVApp PowerShell cmdlets to publish and install the extension. 


Limitations
Runtime package only works for on-premise installations and cannot be used with AppSource. Addition to that  debugging experience is very limited since the no source code is available 

Please provide your feedback with a comment. 
Thank you and Regards,
Tharanga Chandrasekara
Read more »