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
divakar ddddivakar ddd 

automatically 1)Identify how many parameters are ther in the method? 2)Identify what are different datatypes of those inputparametes?

 public Map<ID,List<string>> Inputmethod(string input1,Map<ID,List<string>>,input2,Map<ID,Map<ID,set<integer>>>)
{
         List<string>AccList =input2.values();
        List<Account>AccList=New List<Account>();
    for(string AccName=AccList){
        Account a=New Account();
        a.Name=AccName;
        AccountList.add(a);
    }
    insert AccList;
    return Map<ID,list<string>>;
        

Raj VakatiRaj Vakati
Hello, 

To answer your questions, Please find my comments here  
  • Its difficult to identify any method automatically with how may params it's having and its data types. In Salesforce, there is no reflection APIS
  • What you can do it , you can implement method overload based on key data types and arguments to solve this type of problem  partially  
divakar ddddivakar ddd
y cant automatically parameters and its datatypes add to the class or based on requirement .my intention is suppose we have to do on like above code the account list directly added to  the object based on datatypes and parameters .ok but wt ever we have done ===> that actions are automatically like which parameters it wants and which datatypes LIKE ROBOT  .... IS it possible ????