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 :
Small and medium business | Business Central, N...
Suggested Answer

sending OData post to insert data returns already exist

(0) ShareShare
ReportReport
Posted on by 45

Hi all.

I am trying to insert a simple row in Account Schedule. Schedule Name is already created in Account Schedules page. Issue is when i use postman to send data to account Schedule., I get following error

{
    "error": {
        "code": "Internal_EntityWithSameKeyExists",
        "message": "The record in table Acc. Schedule Line already exists. Identification fields and values: Schedule Name='',Line No.='10001'  CorrelationId:  eb85b786-d673-47d1-b43b-71b518998691."
    }
}

My request body looks like this:

{
	"Schedule_Name": "IC1",   /// It is already in Account Schedules
	"Line_No": 10001,
    "Row_No": "10",
    "Description": "Total Revenue",
    "Totaling_Type": "Posting Accounts",
    "Totaling": "40100..40400",
    "Row_Type": "Balance at Date",
    "Amount_Type": "Net Amount",
    "Show_Opposite_Sign": false,
    "Dimension_1_Totaling": "",
    "Dimension_2_Totaling": "",
    "Dimension_3_Totaling": "",
    "Dimension_4_Totaling": "",
    "Show": "Yes",
    "Bold": false,
    "Italic": false,
    "Underline": false,
    "Double_Underline": false,
    "New_Page": false
}

Is it because of composite keys or Schedule Name is coming from related Table?

Please point me in right direction to resolve this issue.

Regards

I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    Does the same issue happen when using "Edit in Excel"?

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    POST is an Insert operation, so here it seems that you're posting a record with the same primary key.

  • sami khan Profile Picture
    45 on at

    There is no action called "Edit in Excel"

  • sami khan Profile Picture
    45 on at

    Steano Thanks for reply. It is a composite key with fields "Schedule Name" and "Line No.". As you can see in Json. I am providing values for both. But in response Schedule Name is empty while Line No. has value.

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    Please check that:

    - you don’t have a record with those primary key values

    - if the record is not present, please check if you have code in OnValidate or OnInsert triggers that does something.

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,577

#2
YUN ZHU Profile Picture

YUN ZHU 888 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 778 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans