Is the following pseudo-code right ?
Thank you
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156