I have an apex method for eg:

public static Boolean doSomething(String a, String b, String c) {}

When I update this method to

public static Boolean doSomething(String a, String b, String c, String d) {}

and I use it in Lightning

var x = component.get('c.doSomething');
    a: '1', b:'2', c:'3', d:'4'

it should send params a,b,c,d.

sometimes, it does not get recompiled and only sends params a,b,c.

sometimes, renaming this method works, but sometimes I have to create a class to get the change in.

1. The code is updated from the first method to second method
2. No errors
3. It does not see the new method signature update

  • Are these the exact method signatures (ie, 4 strings)? If not, what are the types used by the method? Do both methods exist at the same time in the class? Is any error given when the wrong method is called? – battery.cord Apr 24 '18 at 17:29
  • updated to reflect your questions – biskit Apr 24 '18 at 17:34
  • So it calls the method with three signatures instead of four? If you were to change the return of the functionality, does it call the old behavior instead of the new? If it does, it sounds like excessive caching causing problems for you. – battery.cord Apr 24 '18 at 17:40
  • the method with 3 parameters don't exists in the code anymore, but that's what's called. I tried what you said, to change the return value. Still did not trigger a proper recompile – biskit Apr 24 '18 at 17:45
  • 1
    This worked though. I used the DeveloperConsole to add a new method with the same signature, that was callable correctly. Then removed it and went back to original signature and was called correctly. Initial code was deployed using IlluminatedCloud, so tagging it here. – biskit Apr 24 '18 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.