• João Lima
  • NEWBIE
  • 5 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi all,

I need a new field on Opportunity to handle an External ID.  Having looked at existing Custom Fields on my Opp, I have found one called Order_ID__c, which doesn't appear to have been used to date and fits my purpose.

I executed the following in the Query Editor in Developer Console for the Live environment:

SELECT Count(Id) FROM Opportunity WHERE Order_ID__c != null
and got the following response:
 
[object Object]: Count(Id) FROM Opportunity WHERE Order_ID__c != null ^ ERROR at Row:1:Column:41 No such column 'Order_ID__c' on entity 'Opportunity'. 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.

When I execute this in Query Editor in my Sandbox for the same Org, I successfully receive a Query Result (0).  Any idea why this is happening?

Many thanks!