Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#75 - Optimized CRM queries related to workflows, plugins, customapis… #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Delegate.Daxif/Common/CrmDataInternal.fs
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ module CrmDataInternal =

let retrieveCustomAPIsBySolution proxy (solutionId: Guid) =
let q = QueryExpression("customapi")
q.ColumnSet <- ColumnSet(true)
q.ColumnSet <- ColumnSet("customapiid", "uniquename")

let le = LinkEntity()
le.JoinOperator <- JoinOperator.Inner
Expand Down Expand Up @@ -604,7 +604,7 @@ module CrmDataInternal =
le.LinkCriteria.Conditions.Add
(ConditionExpression(an, ConditionOperator.Equal, solutionId))
let q = QueryExpression(ln)
q.ColumnSet <- ColumnSet(true)
q.ColumnSet <- ColumnSet("sdkmessageprocessingstepid", "name", "stage", "statecode", "statuscode")
q.LinkEntities.Add(le)
CrmDataHelper.retrieveMultiple proxy q

Expand Down Expand Up @@ -636,7 +636,7 @@ module CrmDataInternal =
// Only definition workflows
f.AddCondition(ConditionExpression(t, ConditionOperator.Equal, 1))
let q = QueryExpression(ln)
q.ColumnSet <- ColumnSet(true)
q.ColumnSet <- ColumnSet("workflowid", "name", "ownerid", "statecode", "statuscode") // Determined primarily by Solution\Extend.fs usage
q.LinkEntities.Add(le)
q.Criteria <- f
CrmDataHelper.retrieveMultiple proxy q
Expand Down
2 changes: 1 addition & 1 deletion src/Delegate.Daxif/Modules/Workflows/WorkflowsHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ let instantiateAssembly (solutionId : Guid) (solutionName : string) dllName dllP
log.Verbose "Retrieving assemblies from CRM"

let ln = @"pluginassembly"
let attrToReturn = Query.ColumnSet (true)
let attrToReturn = Query.ColumnSet ("pluginassemblyid", "name", "publickeytoken", "culture") // Based on usage in updateAssembly function
let version = asm.GetName().Version.ToString()

let pluginAssemblies =
Expand Down