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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Create Expenses with Odata

(0) ShareShare
ReportReport
Posted on by 5

Hi.

I'm looking for a way to import Expenses from a third party system into D365 Finance using Odata.

Browsing through the Odata metadocs I can find entity Expense but I can't find ExpenseReport Entity.

I assume the approach would be something like create a ExpenseReport, retrieve system generated ReportNumber and create/add Expenses to the created ExpenseReportNumber?

Anyone who can give me some advice or hints how to proceed?

Br.

Fredrik

I have the same question (0)
  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    14,950 Super User 2026 Season 1 on at

    Hi Fredrik,

    Which entity do you mean? (Staging table: TrvExpTransStaging ?)

    If you want to import data to D365FO via ODATA entity please check the following thread:

    community.dynamics.com/.../updating-records-using-odata

  • FredrikStahle Profile Picture
    5 on at

    Hi Alireza,

    Yes the entity is TrvExpTransStaging.

    I'm using ODATA through Rest API so {env uri}/data/Expenses will give me TrvExpTransStaging.

    But I can't find which entity ExpenseReportNumber is connected to.

    ExpenseReportNumber is included in response from {env url}/data/Expenses.

    @odata.context": "{env uri}/data/$metadata#Expenses",

      "value": [

          {

              "@odata.etag": "W/\"JzU3MjUxMTc4Nyw1NjM3MTQ0NTc2Jw==\"",

              "ExpenseTransactionNumber": "00000001",

              "TransactionDate": "2022-09-15T12:00:00Z",

               "Billable": "Chargeable",

              "ExpenseReportNumber": "SE01-000001",

             ......

    Regards,

    Fredrik

  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    14,950 Super User 2026 Season 1 on at

    Hi Fredrik,

    I have just tested via UI and i get data for "ExpenseReportNumber" field:

    You can add data/Expenses?cross-company=true to D365FO URL (xxxx.dynamics.com/.../Expenses

    pastedimage1663751657161v1.png

  • FredrikStahle Profile Picture
    5 on at

    Hi Alireza,

    Yes but my problem is that if to POST/Create an Expense transaction with ODATA API I first need to create a ExpenseReport to get the system generated ExpenseReportNumber to add to the Expense metadata/body.

    And I can't find a way to create a ExpenseReport?

    Thank you for helping me out on this :-)

    Regards

    Fredrik

  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    14,950 Super User 2026 Season 1 on at

    Hi Frank,

    I cannot find a standard entity for TrvExpTable where you can create a new expense report.

    Once you create a new report, you need to add required info (e.g. Amount, Expense category, dimension values) and then submit it:

    pastedimage1663753070205v1.png

    Once it is submitted it can be found on "All expense report" and Expenses entity.

  • FredrikStahle Profile Picture
    5 on at

    Hi Alireza,

    Really strange why TrvExpTable is not an Entity when one could fetch TrvExpTransStaging through the API which is bound to TrvExpTable?

    Br.

    Fredrik

  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    14,950 Super User 2026 Season 1 on at

    Hi Fredrik,

    You can try to create a custom entity based on TrvExpTable to fulfil your requirement.

    Please check following post on Microsoft docs about creating a new entity:

    learn.microsoft.com/.../build-consuming-data-entities

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 692

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 532 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 478

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans