Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Answered

Trying to update Contacts

Posted on by 2,140

Is the following pseudo-code right ?





Thank you
  • Verified answer
    mobeenmohsin Profile Picture
    mobeenmohsin on at
    RE: Trying to update Contacts with the correct Account based on coincidence in domain of their email address.

    Hi Chris,

    The pseudo code seems to be correct but it will take time as you are have nested loops which is not optimized. You can get two objects for accounts and contacts and use Find or similar method to find the relevant account. It will be great if we can get both account and contact records in same object using some where clause but the possibility for this is low. You can go with you code if there are no much records and we can also use https://docs.microsoft.com/en-us/dotnet/api/microsoft.xrm.sdk.messages.executemultiplerequest?view=dynamics-general-ce-9 to avoid load on server. Thank you.

    Best Regards,

    Mobeen Mohsin  

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans