I have the following code :
Schema.SObjectType objectType = sObjects.get(0).getSObjectType();
I'm trying to write an IF statement to check if the result of objectType is specific object such as Account.
I have written something like this :
if(objectType == Schema.SObjectType.Account)
But this does not work with the Following Error :
Comparison arguments must be compatible types: Schema.SObjectType, Schema.DescribeSObjectResult
So My question is what Comparison argument should i use to validate 'Account' object results? Thanks for any quick help..
SObjectType.Account
compiles and returns the same data that the documentedAccount.SObjectType.getDescribe()
returns.