D365FO- X++ Code logic to show values as Bar code

 X++ Code :

Class ShowBarcodes

{
public static BarCodeString ShowBarcode(str _text)

        {

            Barcode barcode;

    

            barcode = Barcode::construct(BarcodeType::Code128);

            barcode.string(true, _text);

            barcode.encode();

    

            return barcode.barcodeStr();

        }

}

Assigning barcode to the string field:

Syntax : 

Table name . fieldname = Classname:: methodname (parameter value)

E.g : 

Ewaybill. Ewaybarcode =showbarcodes::ShowBarcode(SalesLine_in.EWayBillNo);


output :









Comments

Popular posts from this blog

Create a Tile in a D365FO Workspace with X++ - Microsoft Dynamics Finance and operations

X++ Code to fetch GST, SGST, IGST Sales amounts in D365FO -Indian GST calculation logic

Disable editing of specific financial dimensions on form -Microsoft Dynamics Finance and operations(D365FO)