Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

Call Apex class method on the fly (dynamically)

Asked by Ankesh Kumar Jul 19, 2021 3.0K views 1 answer
Share

About this question

Is there any way I can call the apex method from class if both class name and method are stored in the string.

String strClass = 'BatchUtil'; String strMethod = 'updateAccounts'

now I want to call the above method.. is it possible? I was doing research and came across the following - (not sure how this works and how to call it from salesforce) ExecuteAnonymousResult[] = binding.executeanonymous(string apexcode);

Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.