Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class getpara_Controller {
- private ApexPages.StandardController sc;
- public String para {get;set;}
- public getpara_Controller(ApexPages.StandardController sc) {
- this.sc = sc;
- para = ApexPages.currentPage().getParameters().get('custompara');
- //This is where I try to set the field value, clearly the sc.save() is a separate save of a custom_object__c record from the vf page.
- custom_object__c obj = new custom_object__c(lookup__c = para);
- }
- public PageReference insertRedirect() {
- //Right here, this is where I want to assign the field value before using the sc.save()
- sc.save();
- PageReference endpage = new PageReference('https://www.example.com');
- endpage.setRedirect(true);
- return endpage;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement