A few months ago, when creating a new Case (CDS entity) record from a canvas app, we had to use the following approach to populate the Customer field (polymorphic lookup - Account or Contact):
Approach #1
_customerid_value = XYZ
_customerid_type = "account"
Then at some point of time polymorphic lookups were made easier and all we had to do for populating the Customer field in a Case record was as shown below:
Approach #2
Customer: First(Accounts)
Today, when I tried both approaches I got the following error:
1. Approach #1: _customerid_type does not exist
2. Approach #2: CustomerID is required and missing. However, the editor/studio shows no error until you hit the button which is used to called Patch
Frustrated with errors in both approaches, I decided to go forward with Approach #2 since the editor/studio was not showing any error until I hit Patch. When I repeated the same functionality (hitting the button that called Patch) after playing the app, there was no error and the case record got created! Which is good in a way but very weird.
Let me know if you need any more details.
Thanks!
Hardit Bhatia
Blog | Twitter | LinkedIn | Facebook | YouTube | Email