web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    300,676 Super User 2025 Season 2 on at
    RE: Problem with exporting data via OData to SalesJournalAutoSummary table

    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
    RE: Problem with exporting data via OData to SalesJournalAutoSummary table

    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
    RE: Problem with exporting data via OData to SalesJournalAutoSummary table

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

  • Martin Dráb Profile Picture
    237,640 Most Valuable Professional on at
    RE: Problem with exporting data via OData to SalesJournalAutoSummary table

    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
    RE: Problem with exporting data via OData to SalesJournalAutoSummary table

    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
    237,640 Most Valuable Professional on at
    RE: Problem with exporting data via OData to SalesJournalAutoSummary table

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 758 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 402 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans