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

onClick refresh current URL with commandButton
I am having issues refreshing a page when I click save on my visualforce page. I want to keep the current url but when I try and pass the url from the controller it loses the reference to the timecard id in the url:
I have also tried to implement it in the visual force page which would be my preference using the onclick in the commandbutton:
but it also just goes to the /apex/testaccountpage when i click the button. Any help?
public PageReference save(){ PageReference pageRef = new PageReference(ApexPages.currentPage().getUrl()); system.debug(pageRef); pageRef.setRedirect(true); return pageRef }and the logs show: 09:18:52:328 CODE_UNIT_FINISHED VF: /apex/TestAccountPage but the link I am using is /apex/TestAccountPage?timecardId={!timecard.id}
I have also tried to implement it in the visual force page which would be my preference using the onclick in the commandbutton:
onclick="window.location= ' /apex/TestAccountPage?timecardId={!timecard.id} ' "
but it also just goes to the /apex/testaccountpage when i click the button. Any help?
as you can see here.. https://developer.salesforce.com/forums/?id=906F000000093H7IAI
All Answers
as you can see here.. https://developer.salesforce.com/forums/?id=906F000000093H7IAI