elasticio / salesforce-component

elastic.io component that connects to Salesforce API (node.js)
Apache License 2.0
3 stars 7 forks source link

Issue 106: Add ability to hydrate response with linked objects. #109

Closed bennmcgregor closed 4 years ago

bennmcgregor commented 4 years ago

This is the solution for issue 106: https://app.zenhub.com/workspaces/ps-development-59bbb52d21e82e515786af83/issues/elasticio/salesforce-component/106.

Added a new, optional field in the LookupObject (at most 1) action that displays all related objects (all fields with type reference, ie all the parent sObjects) in a MultiSelectView dropdown. The user can select multiple objects, which will then be included in the SELECT lookup call. The response returns the entire related object, as a nested entry.

I have also bundled in a very tiny fix in response to Salesforce issue 111, where the date/datetime queries were improperly formatted: https://app.zenhub.com/workspaces/ps-development-59bbb52d21e82e515786af83/issues/elasticio/salesforce-component/111.

Note: these changes have exposed a few platform bugs involving MultiSelectViews that are dependent on values in other SelectViews. I've tested them, and for the most part they don't affect the functionality, but I will report them to the platform team (they likely won't be able to replicate them until this PR is merged). In addition to a description of what this new feature does, it would be useful to include documentation about these bugs and how to deal with them until they're fixed by the platform team. The issues are as follows:

  1. MultiSelectViews display "undefined" for values that depend on other fields in an action #3278
  2. Implement dependency-chain functionality for MultiSelectView/SelectView fields. #3279 (a feature proposal to fix the issue in #3278)
  3. MultiSelectViews display values pulled from third-party databases as "undefined" when action is reloaded. #3285