locked
How is the UseWebQueryForLiveExport registry key handled in CRM 2011 RRS feed

  • Question

  • In CRM 4.0 you could use UseWebQueryForLiveExport the Registry key, http://support.microsoft.com/kb/2007050,  to force dynamic excel files to use FetchXML inplace of connecting directly to the CRM database.  This registry key does not work in CRM 2011 and I have heard that UseWebQueryForLiveExport is now stored somewhere in one of the CRM databases tables.  Will someone please let me know how to go about setting this value in CRM 2011.

    Tuesday, October 4, 2011 7:39 PM

Answers

  • Hi Eric,


    You can’t enable it by registry, because it was moved to database in CRM 2011, following MS comments confirm that:


    “Honoured only in OnPremise installation. An organization can choose to use web query mechanism instead of the default sql query mechanism in online client access mode. Replaces a regkey of the same name.

    After a couple of dissembling hours of Microsoft.Crm.dll I found out that you need to add column UseWebQueryForLiveExport to dbo.Organization of MSCRM_CONFIG database. And set it to True on target organization.


    You can add it manually or run script bellow:

    ALTER TABLE [MSCRM_CONFIG].[dbo].[Organization]
    ADD UseWebQueryForLiveExport bit NULL 
    GO
    
    

    And to set it to True:

    UPDATE [MSCRM_CONFIG].[dbo].[Organization]
    SET UseWebQueryForLiveExport = 'True'
    WHERE Id = 'yours org. id'
    
    

    I hope that will help you.

     

    Thursday, October 6, 2011 9:21 AM

All replies

  • Hi Eric,


    You can’t enable it by registry, because it was moved to database in CRM 2011, following MS comments confirm that:


    “Honoured only in OnPremise installation. An organization can choose to use web query mechanism instead of the default sql query mechanism in online client access mode. Replaces a regkey of the same name.

    After a couple of dissembling hours of Microsoft.Crm.dll I found out that you need to add column UseWebQueryForLiveExport to dbo.Organization of MSCRM_CONFIG database. And set it to True on target organization.


    You can add it manually or run script bellow:

    ALTER TABLE [MSCRM_CONFIG].[dbo].[Organization]
    ADD UseWebQueryForLiveExport bit NULL 
    GO
    
    

    And to set it to True:

    UPDATE [MSCRM_CONFIG].[dbo].[Organization]
    SET UseWebQueryForLiveExport = 'True'
    WHERE Id = 'yours org. id'
    
    

    I hope that will help you.

     

    Thursday, October 6, 2011 9:21 AM
  • In CRM 2011 UseWebQueryForLiveExport is a property for the organization in the MSCRM_CONFIG database, however it does not require that you alter the table structure. Please see the URL listed below for more details on how to correctly set this settings.

    Organization Table Metadata (Advanced Settings)

    http://technet.microsoft.com/en-us/library/gg309371.aspx

    "The Organization table contains organization settings required outside the organization context. This data can be retrieved using the RetrieveAdvancedSettingsRequest message. The settings that have IsWritable set to 1 can be updated using the UpdateAdvancedSettingsRequest message. For more information about how to edit these settings with PowerShell, see Read and Update Advanced Settings with PowerShell."

    For UseWebQueryForLiveExport, you would want to follow the link Read and Update Advanced Settings With PowerShell.

    For the script, you would want to specify a string value of "UseWebQueryForLiveExport" for the $SettingName parameter and True for the $SettingValue.

    If you cannot run PowerShell scripts on your server you can run the following commands

    PS C:\Users\Administrator> Add-PSSnapin Microsoft.Crm.PowerShell
    PS C:\Users\Administrator> $setting = New-Object "Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity"
    PS C:\Users\Administrator> $setting.LogicalName = "Organization"
    PS C:\Users\Administrator> $setting.Attributes = New-Object "Microsoft.Xrm.Sdk.Deployment.AttributeCollection"
    PS C:\Users\Administrator> $keypair = New-Object "System.Collections.Generic.KeyValuePair[String,Object]" ("UseWebQueryForLiveExport",$True)
    PS C:\Users\Administrator> $setting.Attributes.Add($keypair)
    PS C:\Users\Administrator> Set-CrmAdvancedSetting -Entity $setting
    PS C:\Users\Administrator>

     

    PS C:\Users\Administrator> Get-CrmAdvancedSetting |FL

    cmdlet Get-CrmAdvancedSetting at command pipeline position 1
    Supply values for the following parameters:
    ConfigurationEntityName: Organization
    Setting: UseWebQueryForLiveExport

    Attributes    : {[Id, e744e1e3-f35d-4af0-b201-198fba791303], [UseWebQueryForLiveExport, True]}
    Id            : 00000000-0000-0000-0000-000000000000
    LogicalName   : Organization
    ExtensionData : System.Runtime.Serialization.ExtensionDataObject


    Thanks

    Clint
    Microsoft Dynamics CRM Support

    Thursday, March 21, 2013 1:56 PM