Tuesday, 23 August 2022

Data Upgrade Extension using AL Code

 Data Upgrade Extension using AL Code

This article provides information about how to make a newer version of extension upgrade available on tenants. The first phase of the process is to develop the extension for upgrading. In this phase, you add code to upgrade data from the previous extension version. Once you have the upgrade code in place, you can publish and synchronize the new version, and the run the data upgrade.

When you develop a new extension version, you must consider the data from the previous version. Determine the modifications that must be made to the data to make it compatible with the current version. For example, maybe the new version adds a new field that needs default values set for existing records. Or, the new version adds new tables that must be linked to existing records. To address this type of data handling, you must write upgrade code for the extension version. If there are no data changes between the extension versions, you don't need to write upgrade code. All data that isn't modified by upgrade code will automatically be available when the process completes.

Source : Documents Library



Thursday, 30 June 2022

Microsoft Business Central solution for Boolean switch problem in the browser (for Onprem version)

Microsoft Dynamics Business Central Boolean Switch problem on Chrome and Edge browser

Bug?

Currently, all Dynamics 365 Business Central SaaS clients running Booleans or Demos on Chrome and/or Edge browser are finding the browsers are shifting true/false fields in BC over the captions of certain fields.

Why its happening?

All pages throughout the system with Boolean Fields (true/false) flags have a bug where the Boolean is getting pushed to the top of the fast tab and hiding the caption for other fields as shown below from a customer card example:

Can we Fix it?

To fix the problem in SaaS version, Microsoft is working already on the issue



To solve this problem OnPrem version, there is solution to modify the desktopPreview.CSS file in our InetPub folder as per below

Note: BC180 can be your local version folder




Now save this file to Desktop and open in Note pad and find the below Tag, and remove the below Yellow Property from the tab

Save this file and copy and paste into your original folder.

.booleancontrol-toggle-switch-container .edit-container .input-wrapper{display: inline-flex;

Now open the browser and check again, issue resolved.




Wednesday, 18 May 2022

Publish all dependent app altogether in Visual studio Code AL

Now easy to Publish all dependent app altogether with the following command

There are few apps which we work on and also have some other app nested, and need to take care before publish the main app, either the other dependent app is already installed, so no to worry, now we have a command which takes care about to install each dependent app with the main app.


 


Publish full dependency tree for active project :

This command traverses all the dependency tree, starting from the current project and going to all the projects loaded into the workspace


See the below screen shot, all the apps including main app installed together, this is the new and cool feature to upload or publish all the app together.



Monday, 11 April 2022

OAuth2.0 Token authentication with AL code for Business central

 OAuth2.0 Token authentication with AL code for Business central - Part 2

In our last video (Part 1) we have been gone through the Token authentication using Postman, App registration with Azure portal, in this part I am showing how we can generate the token and authentication with web api using AL code.




Thursday, 7 April 2022

BC OAuth2 0 Token Based Authentication

BC OAuth2 0 Token Based Authentication (Part -1)

About OAuth

OAuth is an open standard for authorizing access to web services and APIs from native clients and websites in Azure Active Directory (Azure AD). In Business Central, OAuth is useful when your deployment is configured for Azure Active Directory authentication, either through your own Azure subscription or a Microsoft 365 subscription. OAuth lets users sign in to Business Central web services using their Microsoft 365 or Azure AD credentials. Otherwise, they would have to use their Business Central account credentials (user name and password or web access key).

Part 2 - (oAuth2.0 validation through AL Code)

Steps to be followed









Sunday, 20 March 2022

Print QR Code in PaySlip with LS Retail NAV 2016

 I found one of the the method and DLL file which is being used in below code to generate the particular width and height of the QR code in Pay slip.

Note: please check your thermal or Zebra printer setting to print QR code image.


Declarations of Variables

Name DataType Subtype Length

EncodingOption DotNet ZXing.Common.EncodingOptions.'zxing, Version=0.16.6.0, Culture=neutral, PublicKeyToken=830ae994e36ac27d'

BarcodeWriter DotNet ZXing.BarcodeWriter.'zxing, Version=0.16.6.0, Culture=neutral, PublicKeyToken=830ae994e36ac27d'

Barcodeformat DotNet ZXing.BarcodeFormat.'zxing, Version=0.16.6.0, Culture=neutral, PublicKeyToken=830ae994e36ac27d'

BitMatrix DotNet ZXing.Common.BitMatrix.'zxing, Version=0.16.6.0, Culture=neutral, PublicKeyToken=830ae994e36ac27d'

QrCodeBitmap DotNet System.Drawing.Bitmap.'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

ImageFormat DotNet System.Drawing.Imaging.ImageFormat.'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

Zing DLL download here.

LOCAL GenerateQRCode(TexttoQR : Text) QRPath : Text

      EncodingOption := EncodingOption.EncodingOptions();

      EncodingOption.Height := 200;

      EncodingOption.Width := 200;


      BarcodeWriter := BarcodeWriter.BarcodeWriter();

      BarcodeWriter.Format := Barcodeformat.QR_CODE;

      BarcodeWriter.Options := EncodingOption;

      BitMatrix := BarcodeWriter.Encode(TexttoQR);

      QrCodeBitmap := BarcodeWriter.Write(BitMatrix);


      ServerFileName:=COPYSTR(FileManagement.ServerTempFileName(BmpFormat),1,250);

      QrCodeBitmap.Save(ServerFileName, ImageFormat.Bmp);

      ClientFileName:=FileManagement.ClientTempFileName('');

      FileManagement.DownloadToFile(ServerFileName,ClientFileName);


      FileManagement.BLOBImport(TempBlob,ClientFileName);


      FileManagement.BLOBImportFromServerFile(TempBlob, ClientFileName);

      QRPath := FileManagement.BLOBExport(TempBlob, 'InvQrCode.jpg',FALSE);

      EXIT(QRPath);

Thursday, 10 March 2022

Business Central 2021 release wave 2 - Preview Environments.

Business Central 2021 release wave 2 - Preview Environments.


Preview environments are Business Central online sandbox environments that you create on a preview version of the application. When you create the new sandbox environment, choose the preview version marked as (Preview) from the version list. This way, you get a new sandbox environment with a preview version of the application

The newly created preview sandbox environment contains demonstration company data. Trying the preview on a copy of your current production data is not yet supported; nor is testing the upgrade from your current version to the preview. However, you can use the newly created sandbox environment for exploring and learning the new product capabilities. You can also use the preview environment to validate that any per-tenant extensions are still working as expected.



Note: You will be able to test the update on a copy of your production data in a sandbox environment when we release the new update in production in April or October, respectively. When the official release becomes available, you can continue your tests on that version. You will no longer be able to create new preview sandboxes.

 Important

The preview version as well as all sandbox environments that are based on it will be removed 30 days after the official release becomes available.

The following figure illustrates the suggested steps for getting a preview of a major update with example dates for the two release waves in any given calendar year.






Extension Unpublished/Uninstalled history required in BC Production environment

  There is a situation when someone can uninstall or unpublish any APP extension from the extension management in Production environment, th...