You need to sign in to do that
Don't have an account?
joestuart
setting the access on my new class and object (oppertunites) accessible on my web page
Hi I have just successfuly made my Class that checks a custom field in oppertunities, saves the object and then redirects to a thankyou page.
I have tested it and I got 100% code coverage and when I test the page (logged in to salesforce) it works perfectly but when I test it on the public site, the VF pages work but when I click on the submit button it just reloads the page and dosen't fire off the class.
I have added the VF pages to my web profile and the class too but I think there is still somthing that I need to do to make the class public.... I think it is something to do with the access of the APEX class.
Thank you.
Here is my class FYI
public class proteusProposalCon {
private ApexPages.StandardController controller;
public proteusProposalCon(ApexPages.StandardController controller) {
this.controller = controller;
}
public PageReference saveAndCongrat() {
controller.save(); // This takes care of the details for you.
PageReference congratsPage = Page.thankyou;
congratsPage.setRedirect(true);
return congratsPage;
}
}
I have tested it and I got 100% code coverage and when I test the page (logged in to salesforce) it works perfectly but when I test it on the public site, the VF pages work but when I click on the submit button it just reloads the page and dosen't fire off the class.
I have added the VF pages to my web profile and the class too but I think there is still somthing that I need to do to make the class public.... I think it is something to do with the access of the APEX class.
Thank you.
Here is my class FYI
public class proteusProposalCon {
private ApexPages.StandardController controller;
public proteusProposalCon(ApexPages.StandardController controller) {
this.controller = controller;
}
public PageReference saveAndCongrat() {
controller.save(); // This takes care of the details for you.
PageReference congratsPage = Page.thankyou;
congratsPage.setRedirect(true);
return congratsPage;
}
}
Try changing the access modifier of class to Global.
I hope this will help.
Let me know if this helped.
Regards
Virendra
Go to Setup-> Develop - > Apex Class -> click on your class name (proteusProposalCon)
then click on edit
and relapce public to Global.
Regards
Virendra
Now i create the same thing.
and its work fine.
no need to replace public to global.
1. Add both VF pages on site's detail page
2. Add on Public Access Setting button on site's detail page and make sure that your opportunity object have all the permisions which you want.
like if you want to create opportunity then this profile have create permision.
That's all
Regards
Virendra
Hi Virendra, Sorry about the late response, I have been away.
Thank you for your help. I have added the VF pages but there isn't a check box for edit on opportunities. I need public to be able to edit.
Thank you.