You need to sign in to do that
Don't have an account?

cannot fetch the column even having the field accessibility
Hi All ,
i am stuck up at this point of code
i cannot fetch the data of the column with a particular record type
list<product2> p = [select id,name,Gegenkonto__c from product2 where RecordType='Produkte Vertrieb'];
error:
Gegenkonto__c from product2 where RecordType='Produkte Vertrieb' ^ ERROR at Row:1:Column:50 No such column 'RecordType' on entity 'Product2'. 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.
thanks in advance
i am stuck up at this point of code
i cannot fetch the data of the column with a particular record type
list<product2> p = [select id,name,Gegenkonto__c from product2 where RecordType='Produkte Vertrieb'];
error:
Gegenkonto__c from product2 where RecordType='Produkte Vertrieb' ^ ERROR at Row:1:Column:50 No such column 'RecordType' on entity 'Product2'. 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.
thanks in advance
The problem is in where Query. RecordType ==> RecordType.Name
list<product2> p = [select id,name,Gegenkonto__c from product2 where RecordType.Name='Produkte Vertrieb'];
Thanks,
Maharajan.C
All Answers
The problem is in where Query. RecordType ==> RecordType.Name
list<product2> p = [select id,name,Gegenkonto__c from product2 where RecordType.Name='Produkte Vertrieb'];
Thanks,
Maharajan.C