You need to sign in to do that
Don't have an account?
khillan bhardwaj
Dynamically calling static method of apex class
Hi,
I want to call static method dynamically.class or static method present in org should not checked when code is save .It should check at runtime.
we can check whether class present of not dynamicallylike below:
Type t = Type.forName('classname');
But I have not found way to execute staic method at run time.
If someone have idea please let me know.Help is really appreciated.
Thanks
Khillan
I want to call static method dynamically.class or static method present in org should not checked when code is save .It should check at runtime.
we can check whether class present of not dynamicallylike below:
Type t = Type.forName('classname');
But I have not found way to execute staic method at run time.
If someone have idea please let me know.Help is really appreciated.
Thanks
Khillan
All Answers
Hope this helps,
https://developer.salesforce.com/page/Apex_Design_Patterns#Strategy
Regards,
Pavan
Thanks you for replying,
My requirement is as below:
i have create new package x .In the class of this package x, i have called static method of class in other pachage y.when i adding class then class from manage package y is automethically added in the my package.
When i insalled it in new org then it say "Require package is missing""package y version XXX must be installed first".
Now what i need to remove class referance that i have call from our code.it shoud be checked at run time.
Thanks