Skip to main content

Notifications

Announcements

No record found.

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

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

(1) ShareShare
ReportReport
Posted on by 741
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,587 Super User 2024 Season 1 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 741 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... 291,642 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.
     

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans