Announcements
Hello,
I am seeking some advice. - I am writing a CRM (Dynamics365 online) Plugin on pre-Create of a Lead.
Central to this is a (retrievemultiple) query to find out if leads already exist in CRM with the same details (email, name) as the incoming Lead.
I will then use attribute-values from the entities in this resultset in order to update the new/incoming Lead.
In terms of speed/efficiency, future-proofing and (less-so) ease of use, would you recommend I use fetchxml for this query, or Linq, or any other alternative?
Also, am I better to use late or early-binding - is there any performance advantage in either?
Many thanks for advice.
- Seamus
Hello,
I don't think there is better statement than the other, because they are all reflected as SQL statements on the database level. However, the way you write your query and what you want to achieve with it might impact the performance, like aggregation, retrieving all columns instead of only the needed ones, or not using linked entities when needed.
As for early bound and late bound, it doesn't impact the performance because it is a way of writing the code where I prefer to use early bound because it gives you the intellisence and you can avoid the typo errors that can be present in using late bound.
Thanks Ramprakash. So, fetchxml is the "worst"? Any advice of later or early binding, or is there no difference?
Hi Seamus,
Please find the performance order which we can use for Retrieve Multiple
1.QueryExpression
2.Linq
3.Fetchxml
André Arnaud de Cal...
294,110
Super User 2025 Season 1
Martin Dráb
232,866
Most Valuable Professional
nmaenpaa
101,158
Moderator