Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Recurring integr., batch mode: Import header only invoices?

(1) ShareShare
ReportReport
Posted on by 65
Hello.
Please, tell me if my understanding is correct?
 
1. Import of header only invoices in the batch.
    D365 required at least 1 empty(dummy) line in case of all invoices in the batch are header only.
2.  Import of mix of header only and invoices with lines in the batch.  
   If there is one invoice with real line(connected to its header by HeaderReference) in the batch, we must not place empty line for other header only invoices. If we place empty line, D365 will create all invoices without lines, even invoices that have real lines in the package.
Categories:
  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Recurring integr., batch mode: Import header only invoices?
    If you mean a data package, define a data management data source with Type = Package and use it in an import project.
     
  • Andrei Profile Picture
    Andrei 65 on at
    Recurring integr., batch mode: Import header only invoices?
    @Martin
     
    It's highly likely correct behavior of D365 - at least one line must be in the batch package or single invoice package and it has no connection to integration or it is a feature of integration. I wanted to confirm only this state.
     
    But about our test, yes, captain, I understand that you want to localize the cause. )
    Unfortunately, I do not see where I can do it (import) in the UI. Where I can upload my file with XML package. (
  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Recurring integr., batch mode: Import header only invoices?
    What you're importing through recurring integrations is a data package. When I said that you could try to "import this package file manually", I meant exactly the same file you're importing through recurring integrations. Don't try to use something else; doing that would ruin the purpose of the test.
     
    Of course that a data package can be imported manually through data management; a package is one of supported file types. What you're doing through recurring integration is automating what you'd otherwise do manually, so you can and should test whether the step can be performed before you automate it. If we find that the automation isn't the cause of the problem, we'll be able to focus on the right thing and we'll also have a much simpler test scenario.
  • Andrei Profile Picture
    Andrei 65 on at
    Recurring integr., batch mode: Import header only invoices?
    Hi,
    Is there some instruction how to import XML invoices manually in batch mode?
  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Recurring integr., batch mode: Import header only invoices?
    All right, now when you understand what I mean, we can return to the discussion about the error ("The mapping is incorrect for entity Vendor invoice line and field {C47BAF81-13EA-407E-AAAD-C655000E1FF2})".
     
    Do I understand correctly that it happens when you have a file for lines and the file contains an empty Document element?
     
    Do you get the same problem if you import this package file manually? We already found that the problem has nothing to do with OData; maybe we can remove recurring integrations from the question too.
  • Andrei Profile Picture
    Andrei 65 on at
    Recurring integr., batch mode: Import header only invoices?
    Hi, yes of course.
     
    One file in the package contains all headers and another file contains all lines that mapped to headers by HeaderReference field. 
    Like here:

    File 1:
    <?xml version="1.0" encoding="utf-8"?>
    <Document xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <VENDORINVOICEHEADERENTITY>
            <HEADERREFERENCE>1111111-7f43-4ad7-975d-a3f16055c470</HEADERREFERENCE>
            // Data fields
        </VENDORINVOICEHEADERENTITY>
        <VENDORINVOICEHEADERENTITY>
            <HEADERREFERENCE>2222222-7f43-4ad7-975d-a3f16055c470</HEADERREFERENCE>
            // Data fields
        </VENDORINVOICEHEADERENTITY>
    </Document>

    File 2:
    <?xml version="1.0" encoding="utf-8"?>
    <Document xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <VENDORINVOICELINEENTITY>
            <HEADERREFERENCE>1111111-7f43-4ad7-975d-a3f16055c470</HEADERREFERENCE>
            // Data fields
        </VENDORINVOICELINEENTITY>
        <VENDORINVOICELINEENTITY>
            <HEADERREFERENCE>2222222-7f43-4ad7-975d-a3f16055c470</HEADERREFERENCE>
            // Data fields
        </VENDORINVOICELINEENTITY>
    </Document>

  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Recurring integr., batch mode: Import header only invoices?
    A data package contains one or multiple data files (plus some metadata such as mappings) in a ZIP archive. You didn't mention files below, you just shared some texts resembling XML. Could you please tell us what data files you have in the package and what each file contains?
  • Andrei_R Profile Picture
    Andrei_R 7 on at
    Recurring integr., batch mode: Import header only invoices?
    Yes, I import data packages, not files. The job is configured for working with packages, as it is described here: https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/recurring-integrations#create-a-recurring-data-job
     

    "so what exactly do you have inside? Is there no file for lines? An empty file? A file with some contents?"

    I posted 4 use cases with examples of content of data packages in my posting below.
     


     
  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Recurring integr., batch mode: Import header only invoices?
    All right, so let's forget everything you mentioned about OData.
     
    It seems that you're importing a data package, so what exactly do you have inside? Is there no file for lines? An empty file? A file with some contents?
  • Andrei Profile Picture
    Andrei 65 on at
    Recurring integr., batch mode: Import header only invoices?
    Sorry, I mixed up with master data. Of course, I use recurring integration REST API for enqueue packages.

    The error is: "The mapping is incorrect for entity Vendor invoice line and field {C47BAF81-13EA-407E-AAAD-C655000E1FF2}."
    It happens if there are no lines in the package. 

    In fact, I have only two questions from my posting below:

    1)In this case D365 throw an error in the log of my job, because there are no lines in the batch.
    Thus, at least  one line MUST be in the batch. 
    Question: Is it immutable behavior of D365? May be there is some setting to allow send batches without lines?

    2) ... In this case D365 creates 2 header only invoices without any errors in the log of my recurring job.
    Question: Is it correct way to import header only invoices, when only header only invoice are in the batch?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans