How to implement different workflow/process in a Bean

I have created a generic bean with few columns and relationships. I want to extend this bean so that depending on certain values a different class is called and different process is performed?

This is what I am trying to do. 

- initial bean/module: contains shared columns. I have created a drop downlist which will capture which class it is meant to be. SO user will enter this as a required field. based on this value it needs to process one of the below.

    - class 1: extra columns

    - class 2: different process to class 1

    - class 3 : extra process to class 1

How do I created the extra classes? These extra classes will/may have additional cols and I want it to be dynamic so that I don't create module for each class

Parents
  • Hi

    I'm not sure I understand your use case. Are you looking to do something similar to how the Contacts module class extends the Person template class, which in turn extends the Basic class template, which itself extends the SugarBean class?

    If not, then can you please provide some more detail.

    Thanks

  • Hi, If I was doing this in MVC framework I would have abstract class and then inherit different classes accordingly. 

    How would I use templates? I am not familiar with them.

    I was thinking the module bean to be the abstract and then extend but you cannot do that as bean has to relate to a table etc..

Reply
  • Hi, If I was doing this in MVC framework I would have abstract class and then inherit different classes accordingly. 

    How would I use templates? I am not familiar with them.

    I was thinking the module bean to be the abstract and then extend but you cannot do that as bean has to relate to a table etc..

Children
No Data