You need to sign in to do that
Don't have an account?

quick question on calling pageref within pageref
Hey all... I have a bunch of page refs that do separate things, but send the user back to the same page each time.
Is there a way to call one page ref within another?
example:
Public PageReference viewRecord() { PageReference toPage = page.myPage; toPage.getParameters().put('id', my.id); toPage.setRedirect(true); return toPage; } public pageReference doSomething() { integer iAxns, ia; integer numSelectedAxns = selectedAxns.size(); //Loop through the contacts one by one and set them up for ( ia = 0;ia < numSelectedAxns; ia++ ) { IMACtion__c axnToGet = selectedAxns.get(ia); //Now map the fields axnToGet.Shipment_status__c = 'Wow it worked!'; } //Then insert the contacts update actions; //So assuming all that works... let's go look at our record
...Can I call the other page ref right here? How?
}
See what I mean?
Thanks!
Since doSomething() should return something you could simply add
return viewRecord();
All Answers
Since doSomething() should return something you could simply add
return viewRecord();
Yup... I'm a fool...
Thanks!