function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KNKKNK 

Compile Error: sObject type 'Communication_Option_New__c' is not supported. If

Hi Team, I am this error

 

 Compile Error: sObject type 'Communication_Option_New__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names. at line for below code. Please help me here.

 

if (!communicationOption.isEmpty()) {
            for (Contact c : [SELECT Name, Phone, AccountId, Account.Name FROM Contact WHERE Id NOT IN :existingIds AND Id IN :contactIds AND Id IN (SELECT Contact__c FROM Communication_Option_New__c WHERE Communication_Mode__c IN :communicationOption AND Communication_Option__c='Opt In')]) {
                contactList.add(new ContactWrapper(c));
            }
        }
        else {
            for (Contact c : [SELECT Name, Phone, AccountId, Account.Name FROM Contact WHERE Id NOT IN :existingIds AND Id IN :contactIds]) {
                contactList.add(new ContactWrapper(c));
            }

ReidCReidC

I usually get that when I THINK I have created an object, but in fact haven't.

My usual mistake is to spell things wrong.

Just this morning I was working with a class I thought I called "ResponseValue" but in fact had called "ReponseValue".  

Took me way too long to trust the system that the object I thought should be there really wasn't.