0

I'm working on a schedulable class that makes and http callout, I need my schedulable method to start my @future method with my callout. The error I'm getting is

" Method does not exist or incorrect signature: returnAuth()"

 global void execute(SchedulableContext sc) { returnAuth(); } @future(callout = true) static void returnAuth(string loginstring, string Idstring) { string xAuthToken; string st_Today; If(loginstring != null) { HttpRequest req = new HttpRequest(); HttpResponse res = new HttpResponse(); Http http = new Http(); req.setMethod('POST'); // Method Type req.setEndpoint('web210.ntree.com/twig-cstc3/v1/login'); //salestree url req.setHeader('Content-Type', 'application/json'); req.setHeader('{ "username" : ', loginstring); res = http.send(req); 

Anyone know how i can make this work?

4
  • 4
    The returnAuth takes two arguments loginString and IdString. Provide those two arguments in returnAuth method to remove this error. Commented Aug 25, 2015 at 18:40
  • 2
    @Ashwani Can you post that as an answer rather than a comment. Then the question can be marked as answered. Commented Aug 25, 2015 at 22:05
  • n.b. global modifier is not required unless doing managed package; public will suffice Commented Aug 26, 2015 at 0:01
  • What is the line code which is causing this error? Commented Aug 26, 2015 at 5:02

1 Answer 1

2

The returnAuth takes two arguments loginString and IdString.

Provide those two arguments in returnAuth method to remove this error. This would resolve the problem.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.