ImportSalesforceQuery Script Examples

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search

This page contains script examples for the ImportSalesforceQuery script command.

The following example will load date data from the "Contact" table in the Salesforce cloud and put that data into the "ExampleDataTable" data table in the "ExampleProject" project. It will then get the Data Table analysis from the "ExampleDataTable", put that into the "#TABLE" temporary table and then show the contents of that table.

(SELECT 'ProjectName', 'ExampleProject') UNION ALL
(SELECT 'DataTableName', 'ExampleDataTable') UNION ALL
(SELECT 'Append', '0') UNION ALL
(SELECT 'SalesforceUser', 'example.user@qpr.com')  UNION ALL
(SELECT 'SalesforcePW', 'examplepassword')  UNION ALL
(SELECT 'SalesforceQuery', 'SELECT CreatedDate FROM Contact')
--#ImportSalesforceQuery

(SELECT 'AnalysisType', '18') UNION ALL 
(SELECT 'ProjectName', 'ExampleProject') UNION ALL
(SELECT 'MaximumCount', '0') UNION ALL 
(SELECT 'DataTableName', 'ExampleDataTable') UNION ALL 
(SELECT 'TargetTable', '#TABLE') 
--#GetAnalysis 

(SELECT * FROM #TABLE) 
(SELECT 'MaximumCount', '0') 
--#ShowReport