Multilevel Inheritance

Hi,

We are trying to create a pop-up button same way as achieved in Entity inheritance sample project
But we are getting a class cast exception for the same.

Screenshot%20(280)

So, I have a class called party and the child classes to this are 1.Person, 2.Organization
also, Person has several more child classes same way organization too has many child classes

What I am trying to achieve is trying to use the popup button to open the editor screens to both the above-mentioned classes and the child classes to them. Is it possible for me to achieve the same.?

@aditi.n,

Help me understand. What do you want to achieve when you click on Create on the Party browser window?

  1. What child item would you want to create at that point? Person or Organization?

  2. Or do you want to get an option asking you what child item to create?

Because as it is, by default, that Create button is set to create a Party object.

E’m.

When i click the create popup button in the party browser , i want to have options of opening the editor screens or Person and organization which are infact the child classes to Party , But instead when i try to achieve the same I am facing Class cast exception.

For you to understand it better, i will share the screenshots and the code i used.

These are the classes I am dealing with.

Screenshot%20(284)Screenshot%20(286)Screenshot%20(285)

And this is the code.
Code.txt (5.5 KB)

Hi,

Unfortunately, I can’t reproduce the problem. I’ve created a demo project that is based on your screenshots and code and it works as expected. Please, check the project below, hope this helps.

inheritance-demo.zip (88.9 KB)

Regards,
Gleb

Hi,

Thank you so much, will check this out.

Regards
Aditi

Hi,

The code u sent was working fine but i have child classes for Organization and person as well i.e,
Parent Class Party
Child Class Person
Sub Child Class Employee

How to work this out…
The code is working fine with single level inheritance and not multilevel inheritance.

Hi,

I added Employee as an inheritor of Person to the demo project above, and it works without any changes.

Here updated demo inheritance-demo.zip (93.2 KB)

Regards,
Gleb

Hey ,

Thank you so much will try working on this.

Regards