Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Cannot create a record in Global address book

(0) ShareShare
ReportReport
Posted on by 195

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

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Cannot create a record in Global address book

    Could you share your full code?

  • Zohan_93 Profile Picture
    Zohan_93 195 on at
    RE: Cannot create a record in Global address book

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

  • Zohan_93 Profile Picture
    Zohan_93 195 on at
    RE: Cannot create a record in Global address book

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

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Cannot create a record in Global address book

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

  • qianwang Profile Picture
    qianwang 7,151 on at
    RE: Cannot create a record in Global address book

    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

  • Zohan_93 Profile Picture
    Zohan_93 195 on at
    RE: Cannot create a record in Global address book

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

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Cannot create a record in Global address book

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

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,703 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,433 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans