+ Start a Discussion

Object inheritance

I am new to Force.com development.

How do I do object inheritance?

I have created say a Person object and in my application there are several specializations of this Person identified as type. 

Instead of repeating all the fields of the Person object individually in these specializations, I thought I could create the specialization object as inherited from Person, so I get all content/layout of the Person.


I tried with Record Type and it is confusing if that is intended to serve what I want to do.

Is this possible?


Any help is appreciated







Try taking a look at http://www.salesforce.com/us/developer/docs/apexcode/index.htm and search for 'Interfaces and Extending Classes' and 'Extended Class Example'.


You probably want to pay attention to the keywords 'extends' and 'override'.


Hope it helps you a bit further.


/Søren Nødskov Hansen