You need to sign in to do that
Don't have an account?
shravani mil
how to write java script and displaying records
Hi
I have two vf page and class VF_ Page VF_Class
When I click on the links under AB#, it should navigate to the respective Config page. how to use Javascript to navigate to the respective pages.
suppose when i click on AB123 link it should navigate to https://salesforce.com.visual.force.com/apex/VisualForcePage_VF?visualforcepage=0005678799.
I have two vf page and class VF_ Page VF_Class
When I click on the links under AB#, it should navigate to the respective Config page. how to use Javascript to navigate to the respective pages.
suppose when i click on AB123 link it should navigate to https://salesforce.com.visual.force.com/apex/VisualForcePage_VF?visualforcepage=0005678799.
Hi Shravani ,
Pls try this..
Please let me know if this works.
Thanks,
Manohar
Hi Shravani,
Sorry for the late reply. Have you tried changing url.
var str = 'https://ascmanohar-dev-ed--c.ap2.visual.force.com/apex/OppView?id=0062800000Fx8Hu';
put your url address here. URL/apex/vfPageName?id={recordID}
Please let me know if this works.
Thanks,
Manohar
Its taking me to the same link for different numbers as well.
Thanks.
Hi Shravani,
Please share your code. It will help me to debug.
Thanks,
Manohar
<script>
function f1() {
var str = ' https://salesforce.com.visual.force.com/apex/VisualForcePage_VF?visualforcepage=009567';
alert('###'+str);
var win = window.open(str, '_blank');
if (win) {
//Browser has allowed it to be opened
win.focus();
} else {
//Browser has blocked it
alert('Please allow popups for this website');
} }
</script>
<apex:form>
<apex:commandLink value="save" onclick="f1()"/>
</apex:form>
</apex:page>
Hi Shravani,
Thanks, for the code.
https://salesforce.com.visual.force.com/apex/VisualForcePage_VF?visualforcepage=009567
here VisualForcePage_VF should be new page where you want to go .
If we want to pass id to a page then write like this:: https://salesforce.com.visual.force.com/apex/VisualForcePage_VF?id=0062800000Fx8Hu'
you wrote https://salesforce.com.visual.force.com/apex/VisualForcePage_VF?visualforcepage=009567..
visualforcepage=009567 is wrong.
just write https://salesforce.com.visual.force.com/apex/VisualForcePage_VF
that will call that page.
Thanks,
Manohar