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, ...
Suggested Answer

Cannot create a record in Global address book

(0) ShareShare
ReportReport
Posted on by 199

Hi,

I'm getting this error while trying to insert new customer from code in ax2012

Cannot create a record in Global address book(DirAddressBookParty).Record already exists. I've tried to update the address book but still shows the same error. i'm trying to achieve this by using 

DirAddressBookParty::createPartyRelationsByName(custTable.Party, addressBooks);  

I've also checked in diraddressbookparty table whether records exists or not but there is no such record exists. Any suggestion might be helpful.


Regards,
Zohan

I have the same question (0)
  • nmaenpaa Profile Picture
    101,160 Moderator on at

    Do you have some special requirement why you are calling DirAddressBookParty::createPartyRelationsByName(custTable.Party, addressBooks); when you create the customer?

  • Zohan_93 Profile Picture
    199 on at

    to create a relation with customer. so it should be shown on customer screen.

  • qianwang Profile Picture
    7,168 on at

    Hi Zohan93,

    This is usually caused by  that RecId being stored repeatedly in the SystemSequences table.

    You have to find the sequence of your table by tableId and update the NextVal to NextVal+1.

    See the Blog:

    stoneridgesoftware.com/.../

    Hope this helps.

    Regards,

    QianQW

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    But if you simply create a new CustTable record, it's shown in Customer screen and in Global address book, right?

  • Zohan_93 Profile Picture
    199 on at

    I've update as per blog. but still error occurs.

  • Zohan_93 Profile Picture
    199 on at

    yes, but address book field is missing, cause it throws an error of record already exist.

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    Could you share your full code?

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
Martin Dráb Profile Picture

Martin Dráb 584 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 254 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans