Skip to content

Commit

Permalink
#75 - Optimized CRM queries related to workflows, plugins, customapis…
Browse files Browse the repository at this point in the history
… and assemblies.
  • Loading branch information
bo-stig-christensen committed Apr 30, 2024
1 parent a27098a commit b75ca6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit b75ca6e

Please sign in to comment.