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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Import file using Custom Service

(0) ShareShare
ReportReport
Posted on by

Hi,

We have a text file (pipe delimited) to import using Custom Service. It's an electronic file and every row would have it's own number of columns.

We need to import this file to D365FO via Custom Service call.

I am wondering how do we pass the file to the custom service.  What would be the object type of it in the Data contract class?

In C#, we used to do it using Memorystream and FileStream objects but not sure about X++.

Can someone please throw some light on it or if we have any MS standard documentation around this or any standard class from D365FO ?

That would  be  a great help. Thanks.

- Vikky

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Please think again whether a data management API wouldn't be a better choice.

    If not, note that you can simply use simply pass the content in as a string. If you needed any data in general, you could use a byte array (System.Byte[]). Alternatively, pass just a link to the file (e.g. a link to an Azure blob) and let the custom service download it. That's the best way for larger files.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 434 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans