Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

I want to use LIST (use dotnet) in AL Business Central

(1) ShareShare
ReportReport
Posted on by
Hi
 
I have this error and please help me
 
Dll IntegrationInvoiceJOD create by VB.Net
 
The code doesn't give me any error : 
========================================================================
dotnet
{
    assembly(/IntegrationInvoiceJOD/)
    {
        type(IntegrationInvoiceJOD.GeneralSalesInvoice; VAR_Test)
        { }
    }
   
    assembly(/mscorlib/)
    {
        type(System.DateTime; MyDateTime) { }
        type(/System.Collections.Generic.List`1/; List_Of_T) { }
    }
   
}
//========================================================================================================
pageextension 50100 /Sales Order Ext/ extends /Sales Order/
{
    actions
    {
        modify(Post)
        {
            Trigger OnAfterAction()
            var
                justTestInstance: DotNet VAR_Test;
           
                SecretKey: Text[1000];
                keyId: Text[100];
                //===========================================
                QTY: DotNet List_Of_T;            
                LineExtensionAmount: DotNet List_Of_T;
                TaxAmount: DotNet List_Of_T;
                RoundingAmount: DotNet List_Of_T;
                TypeInvoice: DotNet List_Of_T;
                TaxPer: DotNet List_Of_T;
                ItemDescription: DotNet List_Of_T;
                UnitPrice: DotNet List_Of_T;
                TradeDiscountAmount: DotNet List_Of_T;
                //===========================================
                BARCODE_VALUE: Text[250];
                DATENOW: DotNet MyDateTime;
                SalesHeaderRec: Record /Sales Invoice Header/;
                SalesLineRec: Record /Sales Invoice line/;
 
            begin
 
                SecretKey := 'ksckskcscn' ;
                keyId := 'a6b5cfcc-ce28-41c4-a1bf-91c8cd347c6b';
 
                QTY.Add(4.000);
                QTY.Add(2.000);
 
                LineExtensionAmount.Add(1383.400);
                LineExtensionAmount.Add(68.000);
 
                TaxAmount.Add(0.000);
                TaxAmount.Add(6.800);
 
                RoundingAmount.Add(1383.400);
                RoundingAmount.Add(74.8);
 
                TypeInvoice.Add('z');
                TypeInvoice.Add('s');
 
                TaxPer.Add(0.000);
                TaxPer.Add(10.0);
 
                ItemDescription.Add('99');
                ItemDescription.Add('Feed');
 
                UnitPrice.Add(369.000);
                UnitPrice.Add(36.000);
 
                TradeDiscountAmount.Add(92.600);
                TradeDiscountAmount.Add(4.000);
 
                Message('Hello from Posted! 5');
 
                BARCODE_VALUE := justTestInstance.GeneralSalesInvoiceCash_Header('InvoiceID123', 123655555, DATENOW,
                 'Notes', 'InvoiceID123-123655555', '16633377',
                 'الثريا لتجهيز الدواجن / مسلخ', '14253636363525241', '', '', 'عملاء نقدية - غير فعال', '', '297861',
                 keyId, SecretKey, 0, 6.800, 451.400, 458.200, 96.600,
                 QTY, LineExtensionAmount, TaxAmount, RoundingAmount, TypeInvoice, TaxPer, ItemDescription, UnitPrice, TradeDiscountAmount);
 
                Message('InvoiceID: %1', BARCODE_VALUE);
 
            end;


 
        }
    }
 
}
 
===In VB.Net===================================================================
=========================================================================
 
How do I use the list correctly?
 
 
 
 
This link helped me a little
 
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 75,595 Super User 2024 Season 2 on at
    I want to use LIST (use dotnet) in AL Business Central
    Hi, hope the following helps as well.
    And, if you are using Business Central 2023 release wave 1 and later versions, please pay attention to the following information.
    .NET add-ins not using .NET Standard (removal)
     
     
    Thanks.
    ZHU
  • Suggested answer
    I want to use LIST (use dotnet) in AL Business Central
  • gdrenteria Profile Picture
    gdrenteria 12,920 Most Valuable Professional on at
    I want to use LIST (use dotnet) in AL Business Central
    Hi
    I hope this can help you, and give you some hints.
    Best Regards
    Gerardo 

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! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans