Skip to main content

Notifications

Announcements

No record found.

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
Welcome...please help me
 
I want to know how to read the method inside the DLL :
 
  • Rami Mazrawi Profile Picture
    Rami Mazrawi on at
    I want to know how to read the method inside the DLL
    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

    )
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 75,848 Super User 2024 Season 2 on at
    I want to know how to read the method inside the DLL
    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

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,735 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans