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

Error ""Write returned RecId 0 for table row ..."

(1) ShareShare
ReportReport
Posted on by 94

Why am I getting this error when trying to insert data into the LoansRequests table using the LoansRequestsEntity in D365 FO?

 
LoansRequests failed: {
"@odata.context": "https://XXXXX.sandbox.operations.eu.dynamics.com/data/$metadata#Edm.String",
"value": "Write returned RecId 0 for table row of type 'LoansRequestsEntity'. Infolog: .\r\n"
}

I’m sending the row from PowerApps using the OData entity.

I have already checked all the mandatory fields and made sure they are included in the request.

 

It seems like the entity is not writing the record properly, and the returned RecId is 0.

What could be the reason behind this, and how can I fix it?

I have the same question (2)
  • André Arnaud de Calavon Profile Picture
    301,171 Super User 2025 Season 2 on at
    Moved the question from Dynamics 365 General to the correct forum for your question.
     
  • André Arnaud de Calavon Profile Picture
    301,171 Super User 2025 Season 2 on at
    Hi Mohammed,
     
    Is the table and the data entity part of a customization? Can you check if the LoansRequestEntity property for IsReadOnly is not set to yes? Is the entity key correctly set on the data entity?
  • MohammedAfeef Profile Picture
    94 on at
     
    Thank you for your help and support!
    Yes, this is part of a customization. I created both the table and the data entity. To confirm:
     
    The IsReadOnly property is set to No .
    The entity key is correctly defined on the data entity.

    I followed the standard process by right-clicking on the table > selecting Add-ins > and then choosing Create Data Entity .
     
    I’ve performed the same steps for other tables, and they worked without any issues. I’m unsure why this particular table and entity are causing errors.
     
    Do you have any suggestions or insights into what might be causing this issue?
  • Raj Borad Profile Picture
    1,428 on at
     
    I think the Post request is successful, but the data does not reflect in the FO table.
    You can check below things.
    Primary Index of your custom table.
    Missing datasource property of staging table
    Any mandatory fields is missing during insert.
     
    Temporarily expose the table as a form and try inserting data manually → this will help you to check validation logic.
     
    Thanks,
    Raj D Borad
  • MohammedAfeef Profile Picture
    94 on at
    Hello @Raj Borad,

    Thank you for your response.

     

    I’m attaching the index details of my custom table as requested.

    Regarding the "Missing datasource property of staging table" — I’m not entirely sure what you mean. If you could clarify that point, it would be helpful.

    As for the mandatory fields, I’ve verified that I’m sending all of them to the entity. None are missing.

    Also, I’ve tested inserting data manually using the Table Browser Form in my development environment, and it works fine — no errors, and the data is saved correctly.

    One more thing to note: I have another custom table with a very similar structure and fields, and it works perfectly with its data entity when inserting data from Power Apps.

     

    Thanks again,

    Mohammed Afeef

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
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 420 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans