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

How to check if Account Teams is enabled?
If the Account Teams is not enabled, the object AccountTeamMember does not exists and I have a compile error.
I would like to know to check if the Account Teams is enabled before doing any query.
Regards
I would like to know to check if the Account Teams is enabled before doing any query.
Regards
If you want to check it through UI then follow this:
Customize | Accounts | Account Teams
If you want to check it in your code then query 'AccountTeamMember', if you find any record then it is enabled (Assuming if it is enabled then atleast one person is using it).
When I try the following code
I obtain the following error
because the object AccountTeamMember doesn't exists.
It's why I wonder if there is a property somewhere in the SFDC model that indicates if the AccountTeam is enabled.
I change the code by replacing the line
by
Doing this, I don't have any compilation errors.
Thanks again to have spent time to give me an answer.
If targetType equals to null - there is no AccountTeamMember sObject and AccountTeam isn't enabled.