DotNet .... is missing (BC22)

MattHMattH Member Posts: 15
Hi,

I am desperately trying to understand why something that I have being doing for years in prior versions of NAV/BC no longer works in BC22. It is to do with Base64 encoding.

In the past, I have often used TempBlob's Base64 Encode/Decode features. I realised recently that in later, but not BC, version Codeunit 10 "Type Helper" has also had Base64 functionality in it.

I see that all of these built-in functionalities appear (unless I am looking in the wrong place) to have disappeared.

I thought I'd just copy-and-paste the functionality from a previous Type-Helper codeunit:

gnvfid5vce28.jpg

This has not worked!

What is confusing me more, is that I have found standard functionality in BC22 (in the Base Application) doing exactly the same thing!

I have tried building a Container that includes the Base Application. This still has not worked.

What am I doing wrong, please can anyone help?

Best Answer

  • ftorneroftornero Member Posts: 524
    edited 2023-09-13 Answer ✓
    Hello @MattH,

    Check if you have defined the path to the dotNet assemblies

    dc12l7ejbldp.png

    And declared the dotNet variables that you want to use.

    ssyofor93squ.png

    And in the ohter hand you can use the codeunit "Base64 Convert" to convert to and from Base64.

    Regards.

Answers

  • ftorneroftornero Member Posts: 524
    edited 2023-09-13 Answer ✓
    Hello @MattH,

    Check if you have defined the path to the dotNet assemblies

    dc12l7ejbldp.png

    And declared the dotNet variables that you want to use.

    ssyofor93squ.png

    And in the ohter hand you can use the codeunit "Base64 Convert" to convert to and from Base64.

    Regards.
  • MattHMattH Member Posts: 15
    Hi @ftornero,

    Many thanks for your quick reply. I really appreciate all your suggestions. I hadn't appreciated that Base64 handling had been moved to its own Codeunit.
  • ShaiHuludShaiHulud Member Posts: 228
    In BC world, the moment you write a variable of type "DotNet", you set yourself up for failure.

    Base64 functionality has been moved to Codeunit "Base64 Convert":
    https://github.com/microsoft/ALAppExtensions/blob/main/BREAKINGCHANGES.md#base64-convert-module
  • MattHMattH Member Posts: 15
    ShaiHulud wrote: »
    In BC world, the moment you write a variable of type "DotNet", you set yourself up for failure.

    Base64 functionality has been moved to Codeunit "Base64 Convert":
    https://github.com/microsoft/ALAppExtensions/blob/main/BREAKINGCHANGES.md#base64-convert-module

    I was easily fooled by the use of DotNet variables in the Base Code.

    I really appreciate the link to the Breaking Changes list. I've also been caught out by the removal of the TempBlob Table a while back. With that one, I quickly discovered that it had also become a Codeunit (after a quick Google, but from a different source to the above).

Sign In or Register to comment.