Tuesday, December 18, 2018

ERROR : MSDYN365BC - Publish Extension Error - NetFx40_LegacySecurityPolicy is enabled and must be turned off.

How to publish App in Business Central without PowerShell ?

While publishing the app I was getting 2 issues :-

Issue 1 :


It was not getting updated and nothing was happening in Output Window. I had installed it via 

PowerShell and it was working for me fine. But there was a problem we need to install several 

versions of same APP. And it was a very lengthy process.

Issue 2 :


While publishing it was giving me error 

MSDYN365BC - Publish Extension Error - NetFx40_LegacySecurityPolicy is enabled and must be turned off.

Solution:

Step 1 :

Go to this file in Service Folder as Shown in Screenshot. (Remember you need to run your system as administrator)


Step 2. Open File in Notepad and find Runtime and make the property to false as shown.

Step 3. Now Restart your NAV Service and Come to visual studio code in your project.
Press F5 or goto View -> Command Pallete -> AL:Publish
Your extension must be published.

If still its not publishing you can comment below.



Monday, December 10, 2018

What is the TempBlob table and why should we use it?

TempBlob  Record Table in Detail






To help you as a developer when writing code to manage import and export of files, you can use the table TempBlob (99008535).

The TempBlob table contains the following fields:

  • Primary Key (integer)
  • Blob (BLOB)

The TempBlob table contains the following functions:

  • WriteAsText
  • ReadAsText
  • ReadAsTextWithCRLFLineSeparator
  • StartReadingTextLines
  • StartWritingTextLines
  • MoreTextLines
  • ReadTextLine
  • WriteTextLine
  • ToBase64String
  • FromBase64String
  • GetHTMLImgSrc
  • GetImageType
  • GetXMLAsText

You should use this table as a temporary table, by setting the Temporary property on the record variable. This makes sure that changes made to the temporary table are not stored in the database. Examples of how to use the TempBlob table are available in codeunit 419 File Management.

Saturday, December 8, 2018

How to implement Event , Publisher and Subscription in AL Visual Studio Code for Business Central?

Dear Readers ,

Today I got one requirement for using Events , Subscription and Publishers in AL Development

environment. Lets start by creating a new Visual Studio Code.

Step 1. Open Visual Studio Code and create a new project and download symbols. To check this you

can go to my this blog. And follow till Step 8.

Step 2. Create a new file Validations.al and then create a Codeunit using snippet tcodeunit.

Step 3. Create a simple function Using a tprocedure

Step 4. And write a Simple code to find out + in Address field.



Step 5. Then type tEventSub for Event Subscriber structure of code and change the values for

customer table as shown in Screen shot.


Step 6. Publish your extension and install to check the Result Dynamics 365 Business Central.