3

This evening I finally started working on an Apex Specialist Superbadge. I followed all the steps to prepare the developer org and started coding, however, I can't compile my code due to this weird error:

Invalid field RecordTypeId for SObject Case

I even tried this SOQL in my Developer Console's Query Editor and it doesn't compile:

SELECT Id, RecordTypeId From Case

And I'm getting this error:

ERROR at Row:1:Column:12 No such column 'RecordTypeId' on entity 'Case'. 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.

What the hell is happening? The above code is valid in all my other sandboxes.

4

You need to add at least one record type to your case object (Setup > Customize > Cases > Record Types) before you can use the RecordTypeId field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.