2

Calling _____.sObjectType works on everything else, why does Task.sObjectType not work?

8

You must have a class or local variable named Task. Any time you get this sort of name shadowing, you can work around it by referencing Schema.Task.sObjectType instead, though you should avoid it in the first place.

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.