web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Violation of Primary Key Constraint PKMC00201

(0) ShareShare
ReportReport
Posted on by 5

Hi

PECO-Error-_2D00_-Copy.jpg

I get the error of Key Constraint PKMC00201 whenever i try to close by year. The year i am trying to close is 2019. This is the first time that a year is being closed in this company. The year 2020 has already been created. 

I request someone to guide me please.

Regards

Shafiq

Categories:
I have the same question (0)
  • Suggested answer
    Cheryl Waswick Profile Picture
    Microsoft Employee on at

    Hello, 

    Review the start and end dates in your fiscal period setup.  No periods can have overlapping or skipped dates for the year or crossing over into the next year. 

    Hope that helps, 

    Thank you, 

    Cheryl Waswick

    Microsoft Support

  • Shafiq Oza Profile Picture
    5 on at

    Hi

    The Start and end dates of fiscal period are ok. Each month starting as follows:

    1-01-2019

    1-02-2019

    1-03-2019

    .

    .

    1-01-2020 and so on

    6747.GP-screenshot.jpg

    Regards

    Shafiq

  • Cheryl Waswick Profile Picture
    Microsoft Employee on at

    Thanks for the screenprint.  That looks fine. 


    The error message is referencing account index =6 for year 2019 and period ''0'.     Query on this in your GL20000 table and see what you find.   Period '0' should only be used for BBF and P&L type transactions from the GL year-end close process.

    You may want to open a support case if you need specific help with looking at your data.  Thank you in advance. 


    Cheryl Waswick

    Microsoft Support

  • Shafiq Oza Profile Picture
    5 on at

    Thank You for your response.

    I have queried GL20000 based on your suggestion, I would like to confirm that there is no period 0 in the database GL20000.

    The year 2019 in the first year for this Company. I am trying to close year 2019. So i think the BFF being in period 0 is not applicable in my case.

    Kindly advise.

    Regards

    Shafiq

  • Shafiq Oza Profile Picture
    5 on at

    I tried the reconcile option in Microsoft Dynamics GP - Tools - Utilities - Financial - Reconcile. The following error popped up.

    Does this mean anything that could help address the issue.

    dbo.MC-ERROR.jpg

    Regards

    Shafiq

  • Suggested answer
    Cheryl Waswick Profile Picture
    Microsoft Employee on at

    That looks like the same error message referencing the same document, which is likely just the first MC document that it's having an issue with, due to the damaged calendar.   I would suggest to make a current backup of the company database, and then print out the fiscal periods, then delete and recreate them.  Steps are in this KB :   You didn't see overlapping dates in the front-end, but maybe the period table is missing dates or has an issue.  It is best to try and recreate the fiscal period calendar, and you can try this in a TEST company first.

    https://support.microsoft.com/en-us/help/871789/how-to-re-create-fiscal-periods-in-microsoft-dynamics-gp


    If that doesn't work, then please open a support case so we can assist you more.  


    Thank you

    Cheryl W

    Microsoft Support

  • Shafiq Oza Profile Picture
    5 on at

    Deleting and re-creating the Fiscal periods rectified the error. The year end closing process successfully completed.

    Thank you for your support.

    Regards

    Shafiq

  • Cheryl Waswick Profile Picture
    Microsoft Employee on at

    Thank you for the confirmation.  Likely there may have been missing/incorrect dates on the fiscal periods in the SY40100.

    Have a good day!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 608

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 591 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans