Category: Uncategorized

How to check Person Account are enabled using Apex?

Some time it is needed to check whether this org has person account enabled or not. There are couple of ways we can think of, Using Describe Call

– Describe Call count against Governor limits. Accessing field of Account (“isPersonAccount”)

In this method exception getting generated if that field doesn’t Exist.

Inner Query in Query Locator Bad Practice

Recently came across one code which had inner query in QueryLocator. For example some one has put that in Start method of Batch apex. To give exact example of Query in Start Method of Batch,

I think this is not the right way of doing query. To get into the reason why, i think […]