You need to sign in to do that
Don't have an account?
prady-cm
Method does not exist or incorrect signature: createCGM(SET<String>, LIST<User>)
Hi,
I having a class where i am calling another method in that class. for some reason i am getting this error
Method does not exist or incorrect signature: createCGM(SET<String>, LIST<User>)
I am sure i am missing something very silly.
Here is how the class is defined
public class helper_User { public static List<User> syncUsingEmail() {
Set<String> setDivision = new Set<String>();
List<user> u = new List<user>();
// do something
createCGM(setDep, u); // Errors out here } public void createCGM(Set<String> setDep, List<User> u) { // do something } }
static method cannot call non static method.
please redeclare to
Let me know in case further help needed.
All Answers
static method cannot call non static method.
please redeclare to
Let me know in case further help needed.
I don't see where you are declaring the createCGM(setDep, u) set. You are trying to pass that as a parameter to the method but as far as I can see you have declared the set with another name:
Set<String> setDivision = new Set<String>();
Maybe you should rewrite the code to:
createCGM(setDivision , u); // Errors out here
Ah!!! How silly of me :)
Thanks Jitendra