function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mahesh p 54mahesh p 54 

I had a custom field named Broker Name for which i set hyperlink when i click on that broker name hyperlink it should navigate to details of that broker name object is that possible?

<apex:page standardController="Broker__c" recordSetVar="Brokers">
    <apex:form>
  <apex:pageBlock >
    <apex:pageBlockTable value="{!Brokers}" var="b">
      <apex:column >
          <apex:commandLink action='/apex/BrokerVisualForcePage'>
              {!b.name}
              <apex:param name="bid" value="{!b.id}" />
          </apex:commandLink>
        </apex:column>
        </apex:pageBlockTable>
  </apex:pageBlock>
        <apex:pageBlock>
            <apex:detail subject="{!$CurrentPage.parameters.bid}"  id="detid"/>
        </apex:pageBlock>
    
        </apex:form>
    
</apex:page>


 
Best Answer chosen by mahesh p 54
Bhargavi TunuguntlaBhargavi Tunuguntla
Hi Mahesh
 
<apex:page standardController="Broker__c" recordSetVar="Brokers">
    <apex:form>
  <apex:pageBlock >
    <apex:pageBlockTable value="{!Brokers}" var="b">
      <apex:column >
          ​<apex:outputlink value="#" onclick="window.open('/{!b.Id}','_blank');">{!b.Name}</apex:outputlink>
        </apex:column>
        </apex:pageBlockTable>
  </apex:pageBlock>
       
    
        </apex:form>
    
</apex:page>

This will be redirecting you to the object detail page.

Thanks.

All Answers

Bhargavi TunuguntlaBhargavi Tunuguntla
Hi Mahesh
 
<apex:page standardController="Broker__c" recordSetVar="Brokers">
    <apex:form>
  <apex:pageBlock >
    <apex:pageBlockTable value="{!Brokers}" var="b">
      <apex:column >
          ​<apex:outputlink value="#" onclick="window.open('/{!b.Id}','_blank');">{!b.Name}</apex:outputlink>
        </apex:column>
        </apex:pageBlockTable>
  </apex:pageBlock>
       
    
        </apex:form>
    
</apex:page>

This will be redirecting you to the object detail page.

Thanks.
This was selected as the best answer
Khan AnasKhan Anas (Salesforce Developers) 
Hi Mahesh,

I trust you are doing very well.

Please try below code:
 
<apex:page standardController="Broker__c" recordSetVar="Brokers">
  <apex:form >
      <apex:pageblock >
          <apex:pageBlockTable value="{!Brokers}" var="b">
              <apex:column > 
                  <apex:outputLink value="/{!b.id}"> {!b.name} </apex:outputLink>
               </apex:column>
          </apex:pageBlockTable>
      </apex:pageblock>
  </apex:form>
</apex:page>


I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in future.

Thanks and Regards,
Khan Anas
mahesh p 54mahesh p 54
Thank a lot  for very quick responses