You need to sign in to do that
Don't have an account?
Ravi kumar 292
How to call the Pagereference method from Apex Class
Hi all,
I have two classes say A and B. Pagereference method is in class B. Now i want to call the method in the class A.
exp:
Public class A{
//i want to call the method here
}
Public class B{
Public Pagereference C(){
//some data
}
}
Please help me on this
Thanks in advance..
I have two classes say A and B. Pagereference method is in class B. Now i want to call the method in the class A.
exp:
Public class A{
//i want to call the method here
}
Public class B{
Public Pagereference C(){
//some data
}
}
Please help me on this
Thanks in advance..
1) http://amitsalesforce.blogspot.in/2015/07/custom-popup-in-salesforce-visualforce.html
One Small example for you :-
Apex class. Page
Let us know if this will help you
you can do some thing like this
public class A {
public PageReference save() {
return (new B()).pay();
}
}
public class B {
public static PageReference pay() {
PageReference pageRef = new PageReference('/006/e');
pageRef.setRedirect(true);
return pageRef;
}
}
hope it works
make sure these points
1) you should call that from pagereference method only
2) make the called method as static
3) setRedirect as true
let me know, if it helps you or need help :)
shiva.sfdc.backup@gmail.com
You can call a method from one class(say class A) into another(say class B) by creating an instance for class A in class B. Please check the below sample code.
Hope this helps you!
Best Regards,
Deepthi