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

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,166 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,166 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,166 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 613

#2
André Arnaud de Calavon Profile Picture

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

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 292 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans