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

Error :Cannot create a record in . The record already exists In D365 Finance and Operations

(1) ShareShare
ReportReport
Posted on by

Hello Experts i have one custom table which is linked to a form , when user is entering and saving  data to the field it gives below error 

Error75.PNG

As per my knowledge this happens when RecId is not getting the correct sequence. so applied this  (Sol 1) solution.  but still error is same. i have also checked my "SystemSequences" table . i suppose to apply this (Sol 2) bur i did not find my tableid in SystemSequences table. only 3 records i can see there. Please find the screen shot below 

Error76.PNG

lastly i have also tried maual clean up of number sequence , but problem remains same. please advise what else i can try.

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Error :Cannot create a record in . The record already exists In D365 Finance and Operations

    Hello Nikolaos,

    This issue has been solved , this was occurring due to some incorrect relation in the table. there is one field in my form "design engineer" that field i was making relation with directparty table, once i removed that relation it worked.

    Thank you so much for all your advice

  • nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Error :Cannot create a record in . The record already exists In D365 Finance and Operations

    Ah, by the way, I think SystemSequences is no longer used in D365 to assign RecIds, so you don't need to worry about it.

    But I warmly recommend testing your code in another system, just in case you have broken something in your current system. But before that, please verify that your latest index changes have been synced. And verify if you really see the system trying to assign the same RecId for the second time.

  • Verified answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Error :Cannot create a record in . The record already exists In D365 Finance and Operations

    Did you remember to synchronize database after changing the index properties to allow duplicates?


    When you debug your code, do you really see that it tries to use the same RecId again? Most likely that's caused because you played around with SystemSequences as described in your first message. So please try it in another system, or restore a backup of your database before you changed SystemSequences table. Or, try to fix the SystemSequences data. If it gives you RecId that was already used, then it's very likely that you have broken the data in the table.

    Normally you should never ever need to change anything in SystemSequences table.

    Of course it's still possible that there's something else that explains the issue, but you haven't shared it. So please try to think if you shared all details about your implementation.

  • Community Member Profile Picture
    on at
    RE: Error :Cannot create a record in . The record already exists In D365 Finance and Operations

    Hello Nikolaos,

    Thank you so much for explaining the scenario in detail. Please find the screen shot of "HcmWorkerIdx". currently AllowDuplicates property is set to be NO, I tried it to set to be YES , but error is same. Please advise.

    Error80.PNG 

    I found when i am entering single record in "ISO_BoardReferencesDetails" from UI it gets successfully saved. the moment i create another record and try to save this i got this error. i guess some how this table consider upcoming record with the same RecID , as rec ID of the second record is the same as first one. As per my knowledge system takes care of RecID automatically and assign each record a unique RecID. but here this is not happening. please correct me if i am wrong in my explanation.   

    When i tried filling data  from Table Browser , it gives the same error.

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Error :Cannot create a record in . The record already exists In D365 Finance and Operations

    Hi Sachin,

    could you please share a screenshot where we see the properties of HcmWorkerIdx? I suspect that you have set AllowDuplicates to No there and that would explain your issue.

    Also please be aware that your Index1 actually doesn't make sense, because already RecId is always unique. So adding an index that says "RecId + LineNumber combination must be unique" doesn't actually restrict anything compared to how the system already works. And because RecId is unique, this index doesn't make much sense in searching the data, either. If you know the RecId and want to search by it, you never need to provide any other fields since you will find exactly zero or one records that match the RecId. You can create a RecId index by setting property CreateRecIdIdx to true.

  • Community Member Profile Picture
    on at
    RE: Error :Cannot create a record in . The record already exists In D365 Finance and Operations

    Hello Nikolaos,

    Thank you for your response , as per your advice i hav3 checked the index.  and i believe it configured as per the business rule. as per rule the  line number and RecID should not repeat as i have motioned only these two field in my index which is set to Allow duplicate NO. other field can be duplicated  but still it gives error. please find screen shot below for more understanding.

    1.Index

    Error77.PNG

    2.Data going to ISO_BoardReferencesDetailstable frm UI

    Error78.PNG

    3.Table Properties 

    Error79.PNG

    Please advice

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Cannot create a record in . The record already exists In D365 Finance and Operations

    Hi,

    most likely it is not related to RecId sequence at all. Instead you need to check all unique indexes in your table (where property AllowDuplicates is set to No) and check if they are created according to your functional requirements. And if they are, then try to understand why your form creates records that don't comply with the uniqueness rules that you defined in your table indexes.

    Or perhaps it's just an user error. For example if a user would create two Customer groups with the same id, they would see this error. In that case there's no issue in the system, instead the user is trying to do something that is not allowed. And the system rightfully prevents it.

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 756 User Group Leader

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 514 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans