Adding custom relation in Salesforce connection fails with error 'System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary'

Adding custom relation in Salesforce connection fails with error 'System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary'

book

Article ID: KB0080378

calendar_today

Updated On:

Products Versions
Spotfire Analyst 7.14 and higher

Description

Starting from TIBCO Spotfire 7.14, new in-built TIBCO Spotfire Salesforce connector has been introduced where functionality of creating 'New Relation', or with a Spotfire analysis migrated from another versions using such relations, results an error like:
ImportException at Spotfire.Dxp.Data:
An exception was thrown by the data connection.
Exception text:
System.InvalidOperationException: Could not find relation 'table#xxxxx' in the schema.

System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary
If there is an existing connection or an analysis with Salesforce connections where 'New Relation' functionality was used, perform the following steps to avoid the issue.

Issue/Introduction

Starting from Spotfire 7.14, new in-built Salesforce connector has been introduced where functionality of creating 'New Relation' is missing. This is so to emphasize child-to-parent type relation i.e 'Add Related' functionality.

Resolution

In TIBCO Spotfire Analyst 7.14, modify analysis where 'New Relation' functionality was used in Salesforce connection by following below steps:
  1. Open the analysis, continue past the warnings you get.
  2. Click Edit > Data Connection Properties.
  3. Select the appropriate connection and click Settings.
  4. Click Edit under General tab.
  5. In the Views in Connection dialog, remove the related tables, then re-add those tables as a separate tables.
  6. Click OK four times.
  7. Click Insert > Columns...
  8. Select to add columns from related table in the same connection.
  9. Click Next and select to match on  columns and click Next.
  10. Select which columns you want to add and click Finish.

Additional Information

Doc: Structural Relations