I'm using the .Net API for what I have to think is a very common use-case: for a specific account, fetch all secondary contacts. Here's the code.
Dim qry As New ObjectQuery(Of CommitCRM.Account)(LinkEnum.linkOR, maxUserCount)
qry.AddCriteria(CommitCRM.Account.Fields.AccountMa nager, OperatorEnum.opEqual, AccountRecID)
Dim results As List(Of CommitCRM.Account) = qry.FetchObjects()
For an account with three contacts this query runs in a second or two. That's acceptable. An account with 75 contacts is taking around 30 seconds. At 190 contacts it takes almost three minutes.
Any ideas?
-- Craig
Dim qry As New ObjectQuery(Of CommitCRM.Account)(LinkEnum.linkOR, maxUserCount)
qry.AddCriteria(CommitCRM.Account.Fields.AccountMa nager, OperatorEnum.opEqual, AccountRecID)
Dim results As List(Of CommitCRM.Account) = qry.FetchObjects()
For an account with three contacts this query runs in a second or two. That's acceptable. An account with 75 contacts is taking around 30 seconds. At 190 contacts it takes almost three minutes.
Any ideas?
-- Craig
Comment