top of page

Barcode-as-a-Service in C/AL

Aktualisiert: 4. Jan. 2022


The smartest way to manage your barcodes


#Barcodes für alle!


👉 www.beyondbarcodes.de bietet eine schnelle und sehr einfache Möglichkeit, eine Barcode-API zu implementieren.


👉 Wir wollen alle glücklich machen, die sich mit Barcodes herumschlagen müssen.


👉 Holen Sie sich einen Account und werden Sie Barcode-Millionär! Wir bieten >1.000.000 Aufrufe pro Monat.


Unsere Featureliste wächst, das Backlog ist voll, wir erweitern unseren Funktionsumfang laufend!





In C/AL kann ein Barcode über unsere API angesprochen werden. In dem folgenden Beispiel wird die Kred.-Artikelnr. als String übergeben und in ein Barcode (hier Code128) konvertiert und als Bild (Standard-Feld BLOB) am Artikel abgelegt.


Get-Barcode-Function


      IF ('' IN [Item."Vendor Item No.",Item."No."]) THEN
        EXIT(FALSE);

      method := STRSUBSTNO('%1/%2?token=%3&height=%4',
        type::CODE128,
        Item."Vendor Item No.",
        'YOUR-TOKEN',
        100
      );
      Consume('https://api.beyondbarcodes.de/v1/barcode/',method,'GET',HttpResponseMessage);

      MemoryStream := HttpResponseMessage.Content.ReadAsStreamAsync.Result;
      Item.Picture.CREATEOUTSTREAM(OutStr);
      MemoryStream.WriteTo(OutStr);
      EXIT(Item.MODIFY);
      


Consume-Function

      
      HttpClient := HttpClient.HttpClient();
      HttpClient.BaseAddress := Uri.Uri(BaseUrl);
      HttpResponseMessage := HttpClient.GetAsync(Method).Result;
      HttpResponseMessage.EnsureSuccessStatusCode();
      

Hier steht die Codeunit 50000 als Implementationsbeispiel zum Download zur Verfügung:

C50000_C_AL
.txt
Download TXT • 2KB

67 Ansichten0 Kommentare

Aktuelle Beiträge

Alle ansehen

BeyondCues

Make your employees' everyday life easier and increase productivity at the same time. BEYOND Cues adds a tab to your role center with “Cues”. Among other things, the cues can be configured to display

bottom of page