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
Mahesh KGMahesh KG 

Invalid number of parameters exceeds: 32

Hi Team,

Why is salesforce linting the parameters to 32?

How can i reslove this issue?
Ajay K DubediAjay K Dubedi
Hi Mahesh,

* If you are using Workbench just build a string of your values and assign them to one parameter

      "'" & Local.param1 & "', '"  & Local.param2 & "', '"  & etc...

* This limit is set by Apex Code's limit of 32 parameters to a function call. I believe you could correct this by modifying the WSDL to have only 32 parameters   
  per function, write in the remaining code for the last 8 parameters, and change the constructor and other related functions to accept a Map or List instead of a list of single parameters. You'll want to document that clearly in your code to make sure future developers are aware of your "hack." I'd be interested in knowing if you are able to complete this successfully.


I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com