You need to sign in to do that
Don't have an account?
SAHG-SFDC
How to redirect to the address from the command button
Hi , I am trying to acheive a functionality where I want to redirect the user to a particular page, I was able to do that using a link, I want to do it with a button
<apex:outputLink value="/oppitm/multilineitem.jsp?oppId={!Opportunity.id}&retURL={!Opportunity.id}" target="_top" style="color:blue ;" >Edit All</apex:outputLink>Any suggestions?
Simple pagereference for your information:
Page:
Controller:
Hope it helps.
Regards,
Brahma
You have used form tag <apex:form> in your page, add “id” attribute like <apex:form id="frm">
Then add following code in your VF page.
<apex:commandButton value="Edit All" onclick="window.open('/oppitm/multilineitem.jsp?oppId={!Opportunity.id}&retURL={!Opportunity.id}','_self')" reRender="frm"/>
Regards,
Yogesh More
Salesforce Consultant || Salesforce Developer
more.yogesh422@gmail.com || +919096872010
www.yogeshmore.com || Skype:-yogesh.more44
@YogRag, I am trying to use your solution, It works as expected , except this is an inline VF page so the new page opens in the inline area, it needs to open in the same window full page
How to acheive that?
Advance thanks :)
Following code helps you to achieve requirement.
<apex:commandButton value="Edit All" onclick="window.open('/oppitm/multilineitem.jsp?oppId={!Opportunity.id}&retURL={!Opportunity.id}','_parent')" reRender="frm"/>
If your problem is solved then mark it as best answer.
Regards,
Yogesh More
Salesforce Consultant || Salesforce Developer
more.yogesh422@gmail.com || Skype:-yogesh.more44
www.yogeshmore.com