Public/Get-SfConfig.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<#
    .SYNOPSIS
    Queries salesforce for configuration from the ecc_Settings_Public__c object.

    .DESCRIPTION
    Used to get the FHIR URL configured for the Salesforce org

    .INPUTS
    None. You cannot pipe objects to Get-SfConfig.

    .OUTPUTS
    A PSobject with the property 'phecc__FHIRURL__c' containing the FHIR url for the configured org.

    .EXAMPLE
    PS> (Get-SfConfig).phecc__FHIRURL__c

    .LINK
    Set-FileConfig

    .NOTES
    Assumes config is initialized for org access.
#>

function Get-SfConfig {
    Invoke-SfQuery "SELECT Id,phecc__FHIRURL__c FROM phecc__ecc_Settings_Public__c"
}