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

Going to Visualforce Page through custom buttons with passing parameters
Hi -
I am trying to navigate to a visual force page, while passing parameters through the URL. Here is what it is without javascript, using the Display in existing window without sidebar or header via URL option.
/apex/QuoteRequestDetailsPage?OpportunitySegmentId={!Opportunity_Segment__c.Id}
I'd like to put this into javascript and add criteria on WHEN we allow people to navigate to this visual force page.
Here's my best try but i'm getting an error:
string url = "/apex/RFPDetailsPage?OpportunitySegmentId="+{!Opportunity_Segment__c.Id}+"&
OpportunityId="+{!Opportunity_Segment__c.Opportunity_ID__c};
window.location.href=url;
I am trying to navigate to a visual force page, while passing parameters through the URL. Here is what it is without javascript, using the Display in existing window without sidebar or header via URL option.
/apex/QuoteRequestDetailsPage?OpportunitySegmentId={!Opportunity_Segment__c.Id}
I'd like to put this into javascript and add criteria on WHEN we allow people to navigate to this visual force page.
Here's my best try but i'm getting an error:
string url = "/apex/RFPDetailsPage?OpportunitySegmentId="+{!Opportunity_Segment__c.Id}+"&
OpportunityId="+{!Opportunity_Segment__c.Opportunity_ID__c};
window.location.href=url;
Please try as below
window.open('/apex/RFPDetailsPage?OpportunitySegmentId=+{!Opportunity_Segment__c.Id}+&
OpportunityId=+{!Opportunity_Segment__c.Opportunity_ID__c}');
If it resolves your problem then please mark this as best answer.
Thanks
Sandeep Singhal
http://www.codespokes.com/
Please try this.
window.open('/apex/RFPDetailsPage?OpportunitySegmentId={!Opportunity_Segment__c.Id}'+'&OpportunityId=+{!Opportunity_Segment__c.Opportunity_ID__c}');
Thanks
Sandeep Singhal
http://www.codespokes.com/
Glad to know that solution helped you. Please mark my answer as best answer so that it will be helpful for others.
Thanks
Sandeep Singhal