Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Import Free Text Invoi...
Finance forum
Suggested answer

Import Free Text Invoices - Header and lines - from one excel file with posting using X++

Posted on by 739
Hello Everyone,
 
I'm currently facing a challenge involving the import of Free Text Invoices - both header and lines - from an Excel file to Dynamics 365 Finance and Operations. I'm looking to accomplish this task using X++ through a dialog box for ease of uploading. Has anyone undertaken a similar customization? I've already conducted a preliminary search, but the available articles were either outdated or did not fully meet the specified requirements.
 
I'm particularly interested in the following points and would appreciate any insights:

1. Do you have any updates for the code/class related to this?
2. Can the file contain multiple lines of free text for a single header?
3. Does the code cover posting after the upload?
 
 
Thanks. 
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,538 Moderator on at
    Import Free Text Invoices - Header and lines - from one excel file with posting using X++
    As you have already seen standard entities, you can use them.
     
    The other work around what you can do is to check how to read all lines in a Excel and to put it in the standard table of free text invoice. Then you can use posting code to post them directly or else you can create a batch job. 
     
    Above 2 things I haven't tried but the 2nd one is the general way we use for importing and posting data.
  • Hisham Alsayed Profile Picture
    Hisham Alsayed 739 on at
    Import Free Text Invoices - Header and lines - from one excel file with posting using X++
     
    Hi Andre,
     
    Thank you for your input. Regarding the dialog box, I'll explore the standard options available. As for using Excel in a standard manner, could you please provide an example from the system? I've exported Free Text invoice data entities from data management and observed that the header and lines are both present in one sheet.
     
    Considering the current capabilities of electronic reporting, do you recommend leveraging it for importing these data? Have you had any experience or tried it before?
     
    Appreciate your insights.
     
    Thanks,
     
     
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,349 Super User 2024 Season 2 on at
    Import Free Text Invoices - Header and lines - from one excel file with posting using X++
    Hi Hisham,
     
    I don't have an exact matching sample available for you. You can check other features in the standard application where you can learn from how to provide a dialog to upload a file. There are also examples how to read an Excel file, however data management is using SSIS components for that job. 
    Depending on the format of the Excel file, it is possible to have headers with multiple lines. You can also check what logic is activated when you post a free text invoice via the user experience and call the same methods in your custom import job.
    I would suggest trying to understand the concept from several articles you found and checking for some examples in the application. Then try to develop a class that will do the work for your requirement.
     

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,349 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,212 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans