web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

I want to know how to read the method inside the DLL

(0) ShareShare
ReportReport
Posted on by 4
Welcome...please help me
 
I want to know how to read the method inside the DLL :
 
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,649 Super User 2025 Season 2 on at
    Hi, hope the following helps.
    Getting started with Microsoft .NET Interoperability from AL
     
    Please note this only applies to the On-Pre version.
     
     
    Thanks.
    ZHU
  • Rami Mazrawi Profile Picture
    4 on at
    sir YUN ZHU      Thank you very much for helping me       
          I wrote the following code to read the class inside the DLL, 
    DLL Name :
    IntegrationInvoiceJOD
    Class Name:
    GeneralReturnInvoice
    inside Class "GeneralReturnInvoice" in C#:
    Public Function JustTest() As String
      Return "Welcom "
    End Function

    ====================================================
    Success: The package is created.
    and giving me an error :
    
    
                                                                                                                                                                                   
    ============================================
    dotnet
    {
        assembly(IntegrationInvoiceJOD)
        {
            type(IntegrationInvoiceJOD.GeneralReturnInvoice;VAR_Test) { }
        }
    }
    pageextension 50100 "Sales Order Ext" extends "Sales Order"
    {
      trigger OnOpenPage();
        var
            justTestInstance: DotNet VAR_Test;
      begin
            justTestInstance := justTestInstance.GeneralReturnInvoice();
            Message('Hello, world! It is: %1', justTestInstance.ToString());
        end;
    }
    ============================================                           
    I want the correct way to call the class from the DLL without Error ??????
    ****Error ([2024-01-21 13:51:35.43] The request for path /BC180/dev/apps?SchemaUpdateMode=forcesync&DependencyPublishingOption=default failed with code UnprocessableEntity. Reason: Extension compilation failed
    TestBC/bin/assemblies/assembliy.AL(3,14): error AL0451: An assembly named 'IntegrationInvoiceJOD, PublicKeyToken=null' could not be found in the assembly probing paths 'C:\Program Files\Microsoft Dynamics 365 Business Central\180\Service\Add-Ins, C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\Microsoft Dynamics NAV\Add-Ins\18.0.26213.26464, C:\Program Files\Microsoft Dynamics 365 Business Central\180\Service\, C:\WINDOWS\Microsoft.NET\assembly\'
    TestBC/bin/assemblies/assembliy.AL(14,27): error AL0185: DotNet 'VAR_Test' is missing

    )

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,577

#2
YUN ZHU Profile Picture

YUN ZHU 888 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 778 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans