2atCrm.psm1

#Requires -Version 4.0 -Modules 2atGeneral

$PSDefaultParameterValues.Clear()
Set-StrictMode -Version 2.0

Import-Module (Join-Path -Path $PSScriptRoot -ChildPath Microsoft.Xrm.Sdk.dll)
Import-Module (Join-Path -Path $PSScriptRoot -ChildPath Microsoft.Crm.Sdk.Proxy.dll)
Import-Module 2atGeneral

Function Get-OrgServiceProxy {
    Param (
        [Parameter(Mandatory=$true)]
        $OrgServiceUri,

        [Parameter(Mandatory=$true)]
        $Credentials
    )
    Get-CallerPreference -Cmdlet $PSCmdlet -SessionState $ExecutionContext.SessionState

    if ($Credentials -is [PSCredential]) {
        $Credentials = $Credentials.GetNetworkCredential()
    }
    if ($Credentials -is [System.Net.NetworkCredential]) {
        $ccred = New-Object System.ServiceModel.Description.ClientCredentials
        $ccred.UserName.UserName = $Credentials.UserName
        $ccred.UserName.Password = $Credentials.Password
        $Credentials = $ccred
    }
    if ($Credentials -isnot [System.ServiceModel.Description.ClientCredentials]) {
        throw "Session credentials specified are of an unsupported type: $($Credentials.GetType().FullName), please use either a PSCredential, a NetworkCredential or a ClientCredentials"
    }

    Write-Verbose "Creating Proxy for uri: $OrgServiceUri and user: $($Credentials.UserName.UserName)"
    New-Object Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy($OrgServiceUri, $null, $Credentials, $null)
}

Function Get-CrmRecord {
    Param (
        [Parameter(Mandatory=$true)]
        [Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy]
        $OrgServiceProxy,
        
        [Parameter(Mandatory=$true)]
        [string]
        $FetchXml
    )
    Get-CallerPreference -Cmdlet $PSCmdlet -SessionState $ExecutionContext.SessionState

    $OrgServiceProxy.RetrieveMultiple((New-Object Microsoft.Xrm.Sdk.Query.FetchExpression($FetchXml))).Entities
}

Function New-CrmRecord {
    Param (
        [Parameter(Mandatory=$true)]
        [Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy]
        $OrgServiceProxy,

        [Parameter(Mandatory=$true)]
        [string]
        $Entity,

        $Attributes
    )
    Get-CallerPreference -Cmdlet $PSCmdlet -SessionState $ExecutionContext.SessionState
    Write-Debug "New-CrmRecord: About to create $Entity"

    $e = New-Object Microsoft.Xrm.Sdk.Entity($Entity)
    $Attributes.Keys | %{ $e[$_]=$Attributes[$_] }

    $n = $OrgServiceProxy.Create($e)

    $c = New-Object Microsoft.Xrm.Sdk.Query.ColumnSet
    $Attributes.Keys | %{ $c.Columns.Add($_) }
    $OrgServiceProxy.Retrieve($Entity, $n, $c)
}

Function Edit-CrmRecord {
    Param (
        [Parameter(Mandatory=$true)]
        [Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy]
        $OrgServiceProxy,

        [Microsoft.Xrm.Sdk.Entity]
        $Record,

        $AttributeUpdates
    )

    $u = New-Object Microsoft.Xrm.Sdk.Entity($Record.LogicalName)
    $u["$($Record.LogicalName)id"]=$Record["$($Record.LogicalName)id"]
    $AttributeUpdates.Keys | %{ $u[$_]=$AttributeUpdates[$_] }
    $OrgServiceProxy.Update($u)

    $c = New-Object Microsoft.Xrm.Sdk.Query.ColumnSet
    $Record.Attributes.Keys | %{ $c.Columns.Add($_) }
    $AttributeUpdates.Keys | %{ $c.Columns.Add($_) }
    $OrgServiceProxy.Retrieve($Record.LogicalName, $Record.Id, $c)
}

Function New-CrmListMember {
    Param (
        [Parameter(Mandatory=$true)]
        [Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy]
        $OrgServiceProxy,

        [Parameter(Mandatory=$true)]
        [Guid]
        $ListId,

        [Parameter(Mandatory=$true)]
        [Guid]
        $MemberId
    )
    Get-CallerPreference -Cmdlet $PSCmdlet -SessionState $ExecutionContext.SessionState
    Write-Debug "New-CrmListMember: About to add member $MemberId to list $ListId"

    $m = New-Object Microsoft.Crm.Sdk.Messages.AddMemberListRequest
    $m.EntityId = $MemberId
    $m.ListId = $ListId
    [void]$OrgServiceProxy.Execute($m)
}

Function Close-CrmRecord {
    Param (
        [Parameter(Mandatory=$true)]
        [Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy]
        $OrgServiceProxy,

        [Microsoft.Xrm.Sdk.Entity]
        $Record
    )
    Get-CallerPreference -Cmdlet $PSCmdlet -SessionState $ExecutionContext.SessionState
    Write-Debug "Close-CrmRecord: about to close $($Record.LogicalName) with id=$($Record.Id)"

    $r = New-Object Microsoft.Crm.Sdk.Messages.SetStateRequest
    $r.EntityMoniker = New-Object Microsoft.Xrm.Sdk.EntityReference($Record.LogicalName, $Record.Id)
    $r.State = New-Object Microsoft.Xrm.Sdk.OptionSetValue(1)  # State 1: Closed
    $r.Status = New-Object Microsoft.Xrm.Sdk.OptionSetValue(2) # Status 2: Closed

    [void]$OrgServiceProxy.Execute($r)
}

Export-ModuleMember -Function Close-*
Export-ModuleMember -Function New-*
Export-ModuleMember -Function Edit-*
Export-ModuleMember -Function Get-*

# SIG # Begin signature block
# MIIhkgYJKoZIhvcNAQcCoIIhgzCCIX8CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDCPfqPUsRFkeQ2
# KVFxmldK7oGRVTGF78i+haPQV9Sl1aCCCzswggU+MIIEJqADAgECAhEAqJN8Yygl
# wn+qXuDcSIPe2DANBgkqhkiG9w0BAQsFADB8MQswCQYDVQQGEwJHQjEbMBkGA1UE
# CBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRgwFgYDVQQK
# Ew9TZWN0aWdvIExpbWl0ZWQxJDAiBgNVBAMTG1NlY3RpZ28gUlNBIENvZGUgU2ln
# bmluZyBDQTAeFw0yMDAxMTQwMDAwMDBaFw0yMzAxMTMyMzU5NTlaMIGTMQswCQYD
# VQQGEwJOTDEQMA4GA1UEEQwHMzU0MiBEWjEQMA4GA1UECAwHVXRyZWNodDEQMA4G
# A1UEBwwHVXRyZW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