+ Start a Discussion
Jos VervoornJos Vervoorn 

Method does not exist or incorrect signature ....while calling method from extention

I have a method created to handle the creation of a case and many other DML activities.
public PageReference SaveAndAssignIncToMe() String rValue; rValue = PullSelectAssignCase.AddCaseTeamMember(ObjCase.id, System.UserInfo.getUserId(), SEConstants.CASEOWN, SEConstants.USER); if(rValue == SEConstants.RETURN_TRUE){ //** So it was ok } else { //** So it was not ok ... }
The method is inside another (global) extention class ...
public static String AddCaseTeamMember(Case c, User u , String mRole, String tUser) { Database.SaveResult caseUpdateResult; String rValue; ///// ///// return rValue; } // End of AddCaseTeamMember
When I call the method from another VF page ... there's no issue ... it's been bugging me for some time now but I can't figure out what is wrong here...
Best Answer chosen by Jos Vervoorn
Jos VervoornJos Vervoorn
Solved as I changed to method back to string and not id.

All Answers

Hi Jos,

Try following. Just I have changed ObjCase.Id to ObjCase, Because you have case object as first parameter in AddCaseTeamMember Method.

rValue = PullSelectAssignCase.AddCaseTeamMember(ObjCase, System.UserInfo.getUserId(), SEConstants.CASEOWN, SEConstants.USER);

Please mark above answer as SOLVED and BEST ANSWER if it helps you.

Yogesh More
Salesforce consultant || Salesforce Developer
more.yogesh422@gmail.com || yogeshsfdc11@gmail.com
www.yogeshmore.com || Skype:-yogesh.more44
Jos VervoornJos Vervoorn
Solved as I changed to method back to string and not id.
This was selected as the best answer