You need to sign in to do that
Don't have an account?
nagnk
Error Error: Compile Error: unexpected token: 'public class Con_Opt_Invoke_Class' at line 1 column 0
public class Con_Opt_Invoke_Class{
@future(callout=true)
public static void Con_Opt_Invoke_Ins_Mtd(Id d)
{
Opportunity optrec=[select name, description, account.name from Opportunity where id=:d];
sobjectPartner3.Soap obj1 = new sobjectPartner3.Soap();
sobjectPartner3.LoginResult lr = obj1.login('adminnaveen@gmail.com','Rn98481649#');
Con_OpportunitiesCLS.Pub_OpportunitiesCls obj = new Con_OpportunitiesCLS.Pub_OpportunitiesCls();
obj.sessionHeader = new Con_OpportunitiesCLS.sessionHeader_element();
obj.sessionHeader.sessionid = lr.sessionId;
obj.Pub_InsertOptMtd(optrec.name, optrec.description, '0019000000RcEWX');
}
}
@future(callout=true)
public static void Con_Opt_Invoke_Ins_Mtd(Id d)
{
Opportunity optrec=[select name, description, account.name from Opportunity where id=:d];
sobjectPartner3.Soap obj1 = new sobjectPartner3.Soap();
sobjectPartner3.LoginResult lr = obj1.login('adminnaveen@gmail.com','Rn98481649#');
Con_OpportunitiesCLS.Pub_OpportunitiesCls obj = new Con_OpportunitiesCLS.Pub_OpportunitiesCls();
obj.sessionHeader = new Con_OpportunitiesCLS.sessionHeader_element();
obj.sessionHeader.sessionid = lr.sessionId;
obj.Pub_InsertOptMtd(optrec.name, optrec.description, '0019000000RcEWX');
}
}
I copied and pasted the same code of your class in my apex class and it saved successfully.
Please check the componenet in which you are trying to save the apex class.
There is no issue with the syntax and the only possible cause is you are saving it in some other components like Apex Triggers or something else.
Thanks,
Abhishek
I tried one more time again iam getting same error
Can you expalin where your trying to save the code?
Is it under Apex Class or Apex trigger?
under Apex class
Please comment the code in your method and than try to save the class.
Please use below code :
Just give a try to the above code and try to save it.
If you still see an error than there may be something wrong which can't be figure out here.
If you need help than you can contact me on :
Gmail : abhishek.bansal@metacube.com
SkypeId : abhishek.bansal2790
Thanks,
Abhishek