Skip to content

Commit

Permalink
Merge pull request #71 from delegateas/70-daxif-550-webresourcesync-f…
Browse files Browse the repository at this point in the history
…ailing-if-many-updates

#70 - Fixed 'useUniqueInstance' to default to 'false' to maintain per…
  • Loading branch information
DanAakesen authored May 23, 2023
2 parents ccaec5b + 2455bde commit 29d0d76
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/Delegate.Daxif/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ open System.Reflection
[<assembly: AssemblyDescriptionAttribute("Delegate Automated xRM Installation Framework")>]
[<assembly: AssemblyCompanyAttribute("Delegate")>]
[<assembly: AssemblyCopyrightAttribute("Copyright (c) Delegate A/S 2017")>]
[<assembly: AssemblyVersionAttribute("5.5.0")>]
[<assembly: AssemblyFileVersionAttribute("5.5.0")>]
[<assembly: AssemblyVersionAttribute("5.5.1")>]
[<assembly: AssemblyFileVersionAttribute("5.5.1")>]
do ()

module internal AssemblyVersionInformation =
Expand All @@ -17,5 +17,5 @@ module internal AssemblyVersionInformation =
let [<Literal>] AssemblyDescription = "Delegate Automated xRM Installation Framework"
let [<Literal>] AssemblyCompany = "Delegate"
let [<Literal>] AssemblyCopyright = "Copyright (c) Delegate A/S 2017"
let [<Literal>] AssemblyVersion = "5.5.0"
let [<Literal>] AssemblyFileVersion = "5.5.0"
let [<Literal>] AssemblyVersion = "5.5.1"
let [<Literal>] AssemblyFileVersion = "5.5.1"
3 changes: 3 additions & 0 deletions src/Delegate.Daxif/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Release Notes
### 5.5.1 - May 23 2023
* Fixed 'useUniqueInstance' parameter to GetCrmServiceClient() with default value: 'false'. - Developer now has to actively enable multiple instances of service client. This is due to potential authentication issues if too many simultaneous tasks are spawning connections (such as WebResourceSync functionality) (@bo-stig-christensen)

### 5.5.0 - May 22 2023
* Added support for Custom APIs. You can use the CustomAPI.cs file from Delegate.Daxif.Scripts to activate the functionality. (@magesoe, @mlRosenquist)
* Added 'useUniqueInstance' parameter to GetCrmServiceClient() with default value: 'true'. - This enables a single script to correctly connect to multiple environments, while still having the option to set the parameter to 'false' in order to optimize any existing scripts that may be adversely affected regarding performance by this change. (@bo-stig-christensen)
Expand Down
7 changes: 4 additions & 3 deletions src/Delegate.Daxif/Setup/EnvironmentSetup.fs
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,16 @@ type Connection = {
| Some cs -> { method = ConnectionMethod.ConnectionString cs }

/// Connects to the environment and returns IOrganizationService
member x.GetService(?timeOut: TimeSpan) =
member x.GetService(?timeOut: TimeSpan, ?useUniqueInstance: bool) =
let timeOut = defaultArg timeOut defaultServiceTimeOut
let useUniqueInstance = defaultArg useUniqueInstance false
match x.method with
| ConnectionMethod.Proxy _ ->
x.GetProxy() :> IOrganizationService
| ConnectionMethod.CrmServiceClientOAuth _
| ConnectionMethod.CrmServiceClientClientSecret _
| ConnectionMethod.ConnectionString _ ->
x.GetCrmServiceClient(timeOut) :> IOrganizationService
x.GetCrmServiceClient(timeOut, useUniqueInstance) :> IOrganizationService

/// Connects to the environment and returns an OrganizationServiceProxy
member x.GetProxy(?timeOut: TimeSpan) =
Expand All @@ -130,7 +131,7 @@ type Connection = {
/// Connects to the environment and returns a CrmServiceClient
member x.GetCrmServiceClient(?timeOut: TimeSpan, ?useUniqueInstance: bool) =
let timeOut = defaultArg timeOut defaultServiceTimeOut
let useUniqueInstance = defaultArg useUniqueInstance true
let useUniqueInstance = defaultArg useUniqueInstance false
match x.method with
| ConnectionMethod.Proxy _ ->
failwith "Unable to get CrmServiceClient with Proxy method"
Expand Down

0 comments on commit 29d0d76

Please sign in to comment.