Feedback__c problem

We have an existing object in our app called Feedback__c.

When we upgraded from Brooklyn to Spark, all the models built on the Feedback__c object seem to be attempting to query skuid__Feedback__c (even though the the soql includes “FROM Feedback__c”).

Any ideas on how to fix this?

1. An error occurred while attempting to perform the following SOQL query: SELECT Demonstrated_Fighting_Spirit__c,Demonstrated_Relevance__c,Enhancements__c,Interaction__c,Interaction__r.Name,Notes__c,Positives__c,Interaction__r.Primary_Staff__c,Interaction__r.Primary_Staff__r.Name,Interaction__r.Patient_Case__c,Interaction__r.Patient_Case__r.Name,Additional_Feedback__c,Demonstrated_Accountability__c,Id FROM Feedback__c WHERE (Interaction__c = ‘a0X1K00000BqAf3UAF’)AND(Additional_Feedback__c != true) ORDER BY Id LIMIT 2 Error:No such column ‘Demonstrated_Fighting_Spirit__c’ on entity ‘skuid__Feedback__c’. If you are attempting to use a custom field, be sure to append the ‘__c’ after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

Yikes - unfortunately there is no way around this other than for you to rename your object to something other than Feedback__c. There is no way for a managed package like Skuid to have an object with the same API name as a local object (such as yours) and for Skuid to run a dynamic SOQL query and not have the query resolved to the managed package’s object.

There is an old idea on the IdeaExchange to fix this by introducing a concept of “No Shadowing” — but unfortunately there is no progress on it. But you should vote for it, and we’ll see if we can get some momentum around it on our end.

https://success.salesforce.com/ideaView?id=08730000000E0bnAAC

https://salesforce.stackexchange.com/questions/205180/soql-dynamic-query-issue-managed-package?rq=1
https://salesforce.stackexchange.com/questions/13353/dynamic-soql-queries-and-managed-namespaces

Sorry, I know this isn’t an easy fix. This is a very frustrating limitation of SOQL. But that’s how it is, unfortunately.

We’ll upvote the idea with all of our accounts… but it looks like a rename is in the works. :frowning:

Matt, I thought of another idea, that might be worth considering depending on how heavily you use this object and in what contexts. You could use a REST Model to make a query to Salesforce, and that would allow you to request your custom Feedback__c records. This will consume API calls, but if your users are requesting this object relatively infrequently, it might not be a big deal. Something to consider. A rename is probably your best bet, so that you can use regular Skuid Models, but if your use of your own Feedback__c record within your Skuid pages is easy to isolate, a REST Model to make the query might be an alternative.

Interesting. Say we’re accessing feedback 50, 200 or 500 times each day. Would all those fall within “relatively infrequently”?

You’ll need to check your organization’s daily API call limits (from the “Company Information” area in Salesforce Setup), and then check to see how how many calls you’re typically using up each day. If you have 1000’s of calls left over on average each day, then you should be fine. 

Zach,

Thanks again for your help on this. I’m encountering the following error when trying to query a specific Feedback record:

There were 1 problems with this Skuid Page. Click to display…

  1. Feedback__c WHERE Interaction__c=a0X1K00000BqB1NUAV ^ ERROR at Row:1:Column:363 Bind variables only allowed in Apex code

Here’s the full (decoded) query string:

q:
SELECT Id,CreatedDate,Additional_Feedback__c,Demonstrated_Accountability__c,Demonstrated_Fighting_Spirit__c,Demonstrated_Relevance__c,Enhancements__c,Name,Interaction__c,Interaction__r.Id,Interaction__r.Name,Notes__c,Positives__c FROM Feedback__c WHERE Interaction__c=a0X1K00000BqB1NUAV

Are we just not allowed to set conditions on the model? Is there a way around this?

You need to use single quotes around the string value (the Interaction__c Id), e.g.

WHERE Interaction__c=‘a0X1K00000BqB1NUAV’

Tada! Like Magic. Thanks!