Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

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

Posted on by 65
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
 
Categories:
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 68,533 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 8,734 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 

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,277 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,126 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans