Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

e-Invoicing patch for AX 2012 R3

(0) ShareShare
ReportReport
Posted on by

Hi All,

Any updates on the e-Invoicing functionality availability for AX2012R3 for Saudi Arabia.

As per the TAX department, it will be mandatory from Dec 2021

Appreciate any updates on the same.

Thanks

Riyas

  • faiz7049 Profile Picture
    2,240 on at
    RE: e-Invoicing patch for AX 2012 R3

    Hi Tony,

    Make sure copy MessagingToolkit.QRCode.dll and paste in Dynamics AX client/Server directory. Then restart AOS it will work.

    Let me know if you face any problem.

    regards,

    Faiz

  • Adulrahman Tony Profile Picture
    124 on at
    RE: e-Invoicing patch for AX 2012 R3

    Dear  faiz7049 ,

    I got " Variable MessagingToolkit has not been declared. "

    Should I add some reference to solve it ?

    Kindly note that I am wroking on ax2012 CU8

    Thanks

  • Suggested answer
    faiz7049 Profile Picture
    2,240 on at
    RE: e-Invoicing patch for AX 2012 R3

    Hi Riyas,

    If issue has been resolved. Kindly mark as a verify answer. 

  • faiz7049 Profile Picture
    2,240 on at
    RE: e-Invoicing patch for AX 2012 R3

    Hi Rikas,

    Verify answer if issue resloved will help to other in community.

    Thanks,

    Faiz

  • faiz7049 Profile Picture
    2,240 on at
    RE: e-Invoicing patch for AX 2012 R3

    Hi Riyas,

    As mentioned in shared post that before run a Sales report restart AOS and Full Compile the application.

    Did you do? If not, try it.

    Thanks

    Faiz

  • Community Member Profile Picture
    on at
    RE: e-Invoicing patch for AX 2012 R3

    Hi, The error before got rectified.  But, once I run the sales invoice report, the below error shows up.

    Assembly containing type MessagingToolkit.QRCode.Codec.QRCodeEncoder is not referenced.

    Object 'CLRObject' could not be created

  • faiz7049 Profile Picture
    2,240 on at
    RE: e-Invoicing patch for AX 2012 R3

    Hi Riyas,

    Please update about error which you was getting before. If error resolved please verify answer.

    Thanks,

    Faiz

  • Suggested answer
    faiz7049 Profile Picture
    2,240 on at
    RE: e-Invoicing patch for AX 2012 R3

    Hi Riyas,

    What error you are getting?

    Use below code.

    display container qrcode()
    
    {
    
            Bindata bindata = new Bindata();
    
            Image Imgobj;
    
            FileIOPermission    perm = null;
    
            System.Drawing.Image img;
    
            System.Drawing.Bitmap obj;
    
            Filename        filename;
    
            Filepath _path;
    
     container con;
    
    str GRate,CustName,CustNumber,GTot,PONox,Company,Amount1,InvDate1,SalesOrder;
        real Amount;
        date InvDate;
    
    MessagingToolkit.QRCode.Codec.QRCodeEncoder encoder = new MessagingToolkit.QRCode.Codec.QRCodeEncoder();
    
    ;
    
      CustNumber=this.custTable_InvoiceAccount().AccountNum;
        CustName=this.custTable_InvoiceAccount().name();
        Company=this.custTable_InvoiceAccount().company();
        InvDate= this.InvoiceDate;
        Amount = this.InvoiceAmountMST;
        SalesOrder=this.SalesId;
        InvDate1=date2str(InvDate,123,2,DateSeparator::Dot,2,DateSeparator::Dot,4,0);
       Amount1=num2str(Amount,2,2,1,0);
    
       obj = new System.Drawing.Bitmap(encoder.Encode("Cust No:"  CustNumber "Cust Name: " CustName " Date: "  InvDate1  " Amount: "  Amount1  " Seller: "  Company));
    
        filename = @"C:\temp\newPhoto.bmp";
    
        perm        = new FileIOPermission(filename, 'RW');
            perm.assert();
    
        //obj = encoder.Encode(CustName);
    
        obj.Save(filename,System.Drawing.Imaging.ImageFormat::get_Bmp());
    
    bindata.loadFile(filename);
    
    con = bindata.getData();
    
    return con;
    }

    Thanks,

    Faiz

  • Suggested answer
    ergun sahin Profile Picture
    8,816 Moderator on at
    RE: e-Invoicing patch for AX 2012 R3

    I'm not sure if it was an error while typing here, but there is no dot between QRCodeEncoder and encoder.

    Other than that, I noticed that he/she didn't add the dll as a reference to the ax in the link, don't skip it.

    Depending on where you used it, you may need to put it in folders on the server or in the GAC.

    Lastly, If you share the error, we can help you fix it.

  • Community Member Profile Picture
    on at
    RE: e-Invoicing patch for AX 2012 R3

    Hi faiz7049, can you please check the code in the above link.  The display method class, on compile shows error in the line :

    MessagingToolkit.QRCode.Codec.QRCodeEncoder.encoder = new MessagingToolkit.QRCode.Codec.QRCodeEncoder();

    Any Ideas?

    Riyas

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,325 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,025 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans