FAKE - F# Make


DynamicsCRMHelper

Contains various functions for interacting with Dynamics CRM. So far there is support for exporting and importing solutions, zipping and unzipping using the Solution Packager, as well as publishing customizations.

Nested types and modules

TypeDescription
DynamicsCrmHelperParams

Parameters for executing Dynamics CRM Helper functions

PackageType

Specify Package Type for usage with Solution Packager

SolutionPackagerAction

Specify which action Solution Packager should be invoked with

SolutionPackagerParams

Parameters for invoking Solution Packager

Functions and values

Function or valueDescription
DynamicsCrmHelperDefaults
Signature: DynamicsCrmHelperParams

Default values for Dynamics CRM Helper You can obtain the solution exchanger as NuGet Package "Dynamics.CRM.SolutionExchanger"

ExportSolution setParams
Signature: setParams:(DynamicsCrmHelperParams -> DynamicsCrmHelperParams) -> unit

Exports solution from Dynamics CRM and save it to file

Parameters

  • setParams - Parameters for invoking solution exchanger

    Sample

    // This Target will get all solutions of all organizations that the executing user has access to, export them as unmanaged and extract them using Solution Packager. // Extracted solutions are stored in a folder named according to the name of the organization they were exported from. Target "SaveAndUnzipAllSolutions" (fun _ -> CreateDir solutions

     1: 
     2: 
     3: 
     4: 
     5: 
     6: 
     7: 
     8: 
     9: 
    10: 
    11: 
    12: 
    13: 
    14: 
    15: 
    16: 
    17: 
    18: 
    19: 
    20: 
    21: 
    
         ExportSolution(fun f -> 
                         {f with 
                             Url = "http://YourOrganizationDiscoveryService"
                             Managed = false
                             AllOrganizations = true
                             WorkingDirectory = solutions
                             TimeOut = TimeSpan.FromMinutes 60.0
                         })
    
         !!(solutions @@ @"\**\*.zip")
           |> Seq.iter(fun solution -> 
                         let dir = DirectoryInfo(solution)                    
    
                         SolutionPackager (fun f ->
                             {f with 
                                 Action = Extract
                                 ZipFile = solution
                                 PackageType = Unmanaged
                                 Folder = extractedDir @@ dir.Parent.Name @@ (Path.GetFileName solution).Replace(".zip", "")
                                 ToolDirectory = @".\tools\SolutionPackager\"
                             }))
    

    )

module Seq

from Microsoft.FSharp.Collections
val iter : action:('T -> unit) -> source:seq<'T> -> unit

Full name: Microsoft.FSharp.Collections.Seq.iter
val solution : obj
val dir : 'a
ImportSolution setParams
Signature: setParams:(DynamicsCrmHelperParams -> DynamicsCrmHelperParams) -> unit

Imports zipped solution file to Dynamics CRM

Parameters

  • setParams - Parameters for invoking solution exchanger
PublishAll setParams
Signature: setParams:(DynamicsCrmHelperParams -> DynamicsCrmHelperParams) -> unit

Publishes all solution component changes.

Parameters

  • setParams - Parameters for invoking solution exchanger
SolutionPackager setParams
Signature: setParams:(SolutionPackagerParams -> SolutionPackagerParams) -> unit

Runs the solution packager tool on the given file for extracting the zip file or packing the extracted XML representation of a solution to a zip file again

Parameters

  • setParams - Parameters for invoking solution packager
SolutionPackagerDefaults
Signature: SolutionPackagerParams

Default values for invoking Solution Packager

Fork me on GitHub