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 :
Microsoft Dynamics AX (Archived)

Update the contact information in worker master Dynamics ax 2012

(0) ShareShare
ReportReport
Posted on by 765

Hi,

i tried below code its create new contact information, its not update the exists contact information

what the mistake in below code ??

DirPartyContactInfoView dirPartyContactInfoView

DirPartyTable  dirParty;
dirPartyContactInfoView.IsPrimary = NoYes::Yes;
dirPartyContactInfoView.Locator = "xyz@gmail.com";
dirPartyContactInfoView.Type = LogisticsElectronicAddressMethodType::Email;
dirPartyContactInfoView.LocationName = "Email";
dirPartyContactInfoView.Party = '24567890';

DirParty = DirParty::constructFromPartyRecId(dirPartyContactInfoView.Party);

dirParty.createOrUpdateContactInfo(dirPartyContactInfoView);

Thanks in advance

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mea_ Profile Picture
    60,284 on at
    RE: Update the contact information in worker master Dynamics ax 2012

    Hi Saravanaa,

    To update existing record you need to specify  DirPartyContactInfoView.Location otherwise AX will create new record.

    If you want to know how to find location you can look at DMFContactPersonEntityClass.GenerateElectronicLocation() method for example.

  • Saravanaa Profile Picture
    765 on at
    RE: Update the contact information in worker master Dynamics ax 2012

    Thank you for reply, please share sample code....

  • Mea_ Profile Picture
    60,284 on at
    RE: Update the contact information in worker master Dynamics ax 2012

    What kind of sample are you looking for ? Did you check method that I mentioned in previous post ?

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans