QR code and Bar code creation in Dynamics 365 Finance and Operation (F&O) using x++ code
Hey guys. In this article, I will show you how to write the code to create your own QR code and Bar code in Dynamics 365 Finance and Operation using x++ code. I believe many of you are struggling with this problem and may not be getting the right one at right time. So, this gift is for you.
What you need to do?
Create two simple classes, one is for QR code creation helper and other is for Bar code generation helper and paste the below code in it.
Now, you can use these classes where you need to add the Bar code or QR code by simply calling it.
Bar code
///
public class AA_CreateBarcodeHelper
{
///
/// Barcode creation
///
/// Pass the text that you want to scan while scanning Bar Code
/// Barcode
public static BarCodeString showBarcode(str barcodeText)
{
Barcode barcode;
barcode = Barcode::construct(BarcodeType::Code39);
barcode.string(true, barcodeText);
barcode.encode();
return barcode.barcodeStr();
}
}
>
QR code
///
public class AA_CreateQrCodeHelper
{
///
/// Generate QR code
///
/// Pass the text that you want to scan while scanning QR Code
/// Bitmap
public static Bitmap generateQRCodeFromBase64(str qrCodeText)
{
Bitmap qrCode;
EFDocQRCode_BR generateQR = new EFDocQRCode_BR();
generateQR.parmErrorCorrectionLevel(QRCodeErrorCorrectionLevel::Medium);
try
{
qrCode = generateQR.generateQRCode(qrCodeText);
}
catch (Exception::CLRError)
{
warning("@ApplicationSuite_Localization:QRCodeIsDamaged");
}
return qrCode;
}
}>
Sachin Shukla is an experienced senior Dynamics 365 Finance & Operations Technical Consultant with a demonstrated history of working in the information technology and services industry.
×
Sachin Shukla
Sachin Shukla is an experienced senior Dynamics 365 Finance & Operations Technical Consultant with a demonstrated history of working in the information technology and services industry.
In Dynamics 365 Finance & Operations (D365 F&O), handling customer jewelry for repairs involves tracking inventory that is not owned by your company but is...
by Editor In-Chief768Comments Off on How to Handle Inventory for Repair Order Item Receipts
Our website uses cookies to enhance your browsing experience, analyze site traffic, and personalize content. By continuing to use our website, you consent to our use of cookies in accordance with our Cookie Policy. You can adjust your cookie settings at any time through your browser. For more details, please refer to our Cookie Policy.