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
Sanju Rana 5Sanju Rana 5 

Ability to write custom class in customer's org

Hi All,

I want to give ability to the customer to write their own custom class and this will be getting called from my managed package.
For example, in my managed package class1 is being called. But within class1 I need to understand that customer don't want to use the logic I have in class1, rather he want to use his own logic, so ideally customer will be writing a CustomClass1 and from my Class1, instead of calling the code of managed package I call CustomClass1 to make the calculations.

One way I can think of using Type.forName and somewhere I store the name of custom class and make use of it.

Looking for suggestions if there is any better way to achieve this.

Thanks!
JeffreyStevensJeffreyStevens
We've done some situations like this before.  We basically, said that the customer had to write a class/method - like CustomClass1.Method1 - with a specific signature.  I could point you to someone who could help if you need more info on it.