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

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: sending OData post to insert data returns already exist

    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.

  • sami khan Profile Picture
    45 on at
    RE: sending OData post to insert data returns already exist

    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.

  • sami khan Profile Picture
    45 on at
    RE: sending OData post to insert data returns already exist

    There is no action called "Edit in Excel"

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: sending OData post to insert data returns already exist

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

  • Suggested answer
    Marco Mels Profile Picture
    on at
    RE: sending OData post to insert data returns already exist

    Hello,

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

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
YUN ZHU Profile Picture

YUN ZHU 446 Super User 2025 Season 1

#2
Sagar Dangar, MCP Profile Picture

Sagar Dangar, MCP 343

#3
Mansi Soni Profile Picture

Mansi Soni 327

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans