You need to sign in to do that
Don't have an account?
Michele McGeoy
Error in SOQL statement: First SObject of the FROM statement must be a valid SObject type
I'm new to Apex coding and am making some modifications to a colleagues code.
I've added this line and am getting the error: First SObject of the FROM statement must be a valid SObject type. at line 106 column 36
Here is the statement:
for(NWSHOP__Bookings__c bk: [Select id,ownerId from NWSHOP.Bookings__c where NWSHOP__Customer_Name__r.CMAX_upload__c = true and LastModifieddate >: exportSettingsObj.NWSHOP__LastExportDate__c])
NWSHOP__Bookings__c is a custom object.
any hints on what a "valid SObject type" is?
I've added this line and am getting the error: First SObject of the FROM statement must be a valid SObject type. at line 106 column 36
Here is the statement:
for(NWSHOP__Bookings__c bk: [Select id,ownerId from NWSHOP.Bookings__c where NWSHOP__Customer_Name__r.CMAX_upload__c = true and LastModifieddate >: exportSettingsObj.NWSHOP__LastExportDate__c])
NWSHOP__Bookings__c is a custom object.
any hints on what a "valid SObject type" is?
You code should be :-
for(NWSHOP__Bookings__c bk: [Select id,ownerId from NWSHOP__Bookings__c where NWSHOP__Customer_Name__r.CMAX_upload__c = true and LastModifieddate >: exportSettingsObj.NWSHOP__LastExportDate__c])
Please let us know if that will help you.
Thanks,
Amit Chaudhary
All Answers
please try NWSHOP__Bookings__c instead of NWSHOP.Bookings__c. NWSHOP.Bookings__c is not a SObject.
Regards
Robert
(mindforce: http://www.mind-force.de) (http://www.mind-force.de)
You code should be :-
for(NWSHOP__Bookings__c bk: [Select id,ownerId from NWSHOP__Bookings__c where NWSHOP__Customer_Name__r.CMAX_upload__c = true and LastModifieddate >: exportSettingsObj.NWSHOP__LastExportDate__c])
Please let us know if that will help you.
Thanks,
Amit Chaudhary