You need to sign in to do that
Don't have an account?
dev_force
Passing $ObjectType.Account to visualforce controller via custom button
I use the following link for a custom button: /apex/apexPage?type={!$ObjectType.Account}
Which is essentially equivalent to: /apex/apexPage?type=001
In my visualforce controller i'd like to compare "001" without hard coding a value. For example, using: "Account.sObjectType" results in "Account" NOT "001".
Is there anything equalivent to "$ObjectType.Account" in Apex ?
Thanks
All Answers
Schema.DescribeSObjectResult accountDescribe = Schema.SObjectType.Account; accountDescribe.getKeyPrefix()