function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
svidyansvidyan 

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

 

Thanks

Vidya

sh-at-youseesh-at-yousee

Hi,

 

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