+ Start a Discussion
Venkata Sravan Kumar BandariVenkata Sravan Kumar Bandari 

PLEASE SOLVE THIS CODE.........No output and also no bugs

<apex:page standardController="Account" recordSetVar="accs">
<apex:pageBlock >
        <apex:pageBlockTable value="{!accs}" var="acc">
        <apex:column headerValue="Action"/>
        <apex:outputLink title="view detail in a Popup window" onclick="return openPopup('{!acc.Id}');"> Details </apex:outputLink>
       <apex:column value="{!acc.Name}"/>
       <apex:column value="{!acc.Industry}"/>
       <apex:column value="{!acc.Type}"/>
       </apex:pageBlockTable>
</apex:pageBlock>
<script>
    function openPopup(id)
    {
    var newwin=windows.open(!'{!$Page.Popup}?id='+id,'Popup','height=600,width=650,left=100,top=100,resizable=no',scrollbars=yes,toolbar=no,status=no');
    if(window.focus)
    {
    newwin.focus();
    }
    return false;
    }
    </script>
    </apex:page>
Vatsal KothariVatsal Kothari
Hi,
Try Below code:
<apex:page standardController="Account" recordSetVar="accs">
<apex:pageBlock >
        <apex:pageBlockTable value="{!accs}" var="acc">
        <apex:column headerValue="Action">
        <apex:outputLink title="view detail in a Popup window" onclick="return openPopup('popup?id={!acc.Id}');" > Details </apex:outputLink>
        </apex:column>
       <apex:column value="{!acc.Name}"/>
       <apex:column value="{!acc.Industry}"/>
       <apex:column value="{!acc.Type}"/>
       </apex:pageBlockTable>
</apex:pageBlock>

Before executing page, create Account records in your Org.

Thanks,
Vatsal
Venkata Sravan Kumar BandariVenkata Sravan Kumar Bandari
Still not working....and the account contains recoeds also

it is not displaying the link details in the vfpage
Vatsal KothariVatsal Kothari
Could you please post your updated code here? because its working for me.

User-added image
Venkata Sravan Kumar BandariVenkata Sravan Kumar Bandari
Here is my code

<apex:page standardController="Account" recordSetVar="accs">
<apex:pageBlock >
        <apex:pageBlockTable value="{!accs}" var="acc">
        <apex:column headerValue="Action">
        <apex:outputLink title="view detail in a Popup window" onclick="return openPopup('popup?id={!acc.Id}');" > Details </apex:outputLink>
        </apex:column>
       <apex:column value="{!acc.Name}"/>
       <apex:column value="{!acc.Industry}"/>
       <apex:column value="{!acc.Type}"/>
       </apex:pageBlockTable>
</apex:pageBlock>
<script>
    function openPopup(id)
    {
    var newwin=windows.open('{!$Page.Popup}?id='+id,'Popup','height=600,width=650,left=100,top=100,resizable=no',scrollbars=yes,toolbar=no,status=no);
    if(window.focus)
    {
    newwin.focus();
    }
    return false;
    }
    </script>
    </apex:page>
rohitsfdcrohitsfdc
Hello Venkata,
Please replace your code with the code below
<apex:page standardController="Account" recordSetVar="accs">
<apex:pageBlock >
        <apex:pageBlockTable value="{!accs}" var="acc">
        <apex:column headerValue="Action">
        <apex:outputLink title="view detail in a Popup window" onclick="return openPopup('popup?id={!acc.Id}');" > Details </apex:outputLink>
        </apex:column>
       <apex:column value="{!acc.Name}"/>
       <apex:column value="{!acc.Industry}"/>
       <apex:column value="{!acc.Type}"/>
       </apex:pageBlockTable>
</apex:pageBlock>
<script>
    function openPopup(id)
    {
    var newwin=window.open('{!$Page.popup}?id='+id,'Popup','height=600,width=650,left=100,top=100,resizable=no',scrollbars='yes',toolbar='no',status='no');
    if(window.focus)
    {
    newwin.focus();
    }
    return false;
    }
    </script>
    </apex:page>

If that solves your problem, please mark this as the best answer.
Thanks
Rohit Girdhar

Venkata Sravan Kumar BandariVenkata Sravan Kumar Bandari
Still not working..... I cant understand what is the problem...the output shown on the page is like this...

  User-added image
rohitsfdcrohitsfdc
Venkata,
That code is working fine for me.

If it is not working for you, it might be a missing permission. Please contact salesforce support. they will help you in this.

Thanks
Rohit