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, ...
Unanswered

Problem with exporting data via OData to SalesJournalAutoSummary table

(0) ShareShare
ReportReport
Posted on by 843

Hi,

The requirement is to be able to export data via OData to the SalesJournalAutoSummary table. By default, such a solution is not available, so I created a new data entity from using the wizard. Everything is OK when the user opens the excel file and downloads the data via OData from D365. The problem arises when he wants to add new data and publish it.
I have already made many custom data entities to export and never had this problem, but unfortunately still exists here..

I created a data entity, added the appropriate fields to the entity key. I set the "Is Read Only" to "No." I updated the staging table..

Zrzut-ekranu-2023_2D00_01_2D00_18-203447.pngZrzut-ekranu-2023_2D00_01_2D00_18-203559.png

When trying to publish the data, a message appears:

Details:
A row created in data set SalesJournalAutoSummaries was not published. Error message: 'Write failed for table row of type 'cst_SalesJournalAutoSummaryEntity'. Infolog: Info: Unable to create a record in table SalesJournalAutoSummary. Form: No, Customer.
Record already exists...'

Can anyone explain why there is a problem with the "No" and "Csutomer" values here?
And after publishing it creates a new line with these values...

Zrzut-ekranu-2023_2D00_01_2D00_18-204901.png

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    303,467 Super User 2026 Season 1 on at

    Hi Shooowtek,

    Do you have x++ coding added to this entity? Have you also tried providing document forms and customer accounts?

  • Shooowtek Profile Picture
    843 on at

    Hello André,

    Thank you for your reply.

    No, I have not added additional code to this entity.

    Are you suggesting that this standard table might have some additional logic when inserting new records?

    I looked through all the standard methods of this table and nothing raised my suspicions.

    I was wondering why this table does not have any data entity to import/export data in standard....

  • Shooowtek Profile Picture
    843 on at

    Any ideas how I can solve this problem with a custom data entity?

  • Martin Dráb Profile Picture
    238,856 Most Valuable Professional on at

    The exception says that the record you're trying to insert has a value in a unique key that is already used on another record. The system rejects such an insert to ensure uniqueness of the key.

  • Shooowtek Profile Picture
    843 on at

    But how is this possible?

    I enter data that is unique, according to the index in the table....

    Could you please explain this?

  • Martin Dráb Profile Picture
    238,856 Most Valuable Professional on at

    I'm sorry, but I don't have enough information needed to identify the problem. I suggest you debug the code. For example, you might start by putting a breakpoint to SalesJournalAutoSummary.insert() and observe what gets inserted. For example, you might find that there is an extra call that you weren't aware of.

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 473

#3
Adis Profile Picture

Adis 284 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans