web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Posted Sales Invoice ( RequestStamp ) ERROR : Wrong value G/L Account in field Type of table Sales Invoice Line

(0) ShareShare
ReportReport
Posted on by 95

Hi 

I need to RequestStamp a Posted Sales Invoice and send me this ERROR:

im use Business Central ( CLOUD )  and my country is Mexico .

pastedimage1584636645820v1.png

this is my Posted Sale Invoice : 

Header

pastedimage1584641816424v2.png

Line 

pastedimage1584641854822v3.png

The ERROR is send in this codeunit 10145 "E-Invoice Mgt." .

Local Procedure RequestStamp

pastedimage1584642209871v4.png

local procedure CheckSalesDocument

pastedimage1584642265806v5.png

local procedure CheckDocumentLine

pastedimage1584642406778v6.png

I need help please .

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    It looks like you need to use Line Type Item or Resource. If you use Item, you need to fill in Sat Item Classification

  • Rcordova NW Profile Picture
    95 on at

    But i need use G/L Account not Item or Resource .

  • Community Member Profile Picture
    on at

    The system only allow you to use Item /Resource for E-Invoicing. You may need to customize it.

  • Rcordova NW Profile Picture
    95 on at

    Ok .

    This is the PROCEDURE bit in Business Central ( CLOUD ) i can't use 

    XMLDoc: DotNet XmlDocument;
    XMLDocResult: DotNet XmlDocument;
    Environment: DotNet Environment;

    pastedimage1584655180419v1.png

    How to replace this var's ?

  • Community Member Profile Picture
    on at

    you need to use XmlDocument Data Type . See below link

    docs.microsoft.com/.../devenv-restapi-overview

  • Rcordova NW Profile Picture
    95 on at

    Im use XmlDocument Data Type for all DotNet Var .

    But how to replace Enviroment : DotNet Enviroment ?

    pastedimage1584689344597v1.png

    The ERROR is The type or method 'System.Environment' cannot be used for 'Extension' development.AL(AL0296) .

  • Suggested answer
    Community Member Profile Picture
    on at

    I check the code and the variable is used in below code.

    OriginalString := TypeHelper.ReadAsTextWithSeparator(InStream, Environment.NewLine);

    Try to replace it with

    OriginalString := TypeHelper.ReadAsTextWithSeparator(InStream, TypeHelper.CRLFSeparator());

  • Rcordova NW Profile Picture
    95 on at

    Ok im try to send this .

    But i have a lot ERROR's in all procedures inside in RequestStamp

    Is there another way to do it without having to replicate everything?

  • Community Member Profile Picture
    on at

    You only need to replicate the function that you used. No need to replicate all.

  • Rcordova NW Profile Picture
    95 on at

    but inside the procedure RequestStamp i have a lot of Procedures to use XML ( DotNet ) and if I change it everything stops working it makes a lot of mistakes .

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,785

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,007 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 948 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans