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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
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 6
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
 
  • Gerardo Rentería García Profile Picture
    27,623 Super User 2026 Season 2 on at
    Hi
    I hope this can help you, and give you some hints.
    Best Regards
    Gerardo 
  • Suggested answer
    Inge M. Bruvik Profile Picture
    on at
  • Suggested answer
    YUN ZHU Profile Picture
    104,146 Super User 2026 Season 2 on at
    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

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 671 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 434 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 241 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans