Toggle Side Panel

  • Home
  • Articles
    • All Articles
    • Blogs
    • Videos
    • Infographics
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Marketplace
  • Advertise With Us
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Home
    • Articles
      • All Articles
      • Blogs
      • Videos
      • Infographics
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Marketplace
    • Advertise With Us
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › How To add link on the Account Name for below given Scenario ?

    Tagged: Account, Contact Record, Custom Link, Help & Training, Hyperlink, Salesforce Customization, URL Field

    • Salesforce® Discussions

      How To add link on the Account Name for below given Scenario ?

      Posted by Aman on July 18, 2017 at 2:20 PM

      when we click on the link we get the description field and contact Associated with that account

      shariq replied 8 years, 5 months ago 2 Members · 1 Reply
      • Account
      • Contact Record
      • Custom Link
      • Help & Training
      • Hyperlink
      • Salesforce Customization
      • URL Field
    • 1 Reply
    • shariq

      Member
      August 14, 2017 at 1:55 PM

      Hi Aman,

      You can try this:-

      Apex Controller

      public class AccountLink
      {
      public String linkId {get;set;}
      public List<Contact> con{get;set;}
      public String searchString{get;set;}
      public List<Account> acct{get;set;}

      public void search1()
      {

      acct= Database.query('Select Name, description From Account WHERE Name LIKE \'%'+searchString+'%\' Limit 100');
      con = new List<contact>();
      }

      public void link()
      {

      con = [SELECT Id, Description, AccountId FROM Contact WHERE AccountId =:linkId LIMIT 100];

      }
      }

       

      Apex Page

      <apex:page controller="AccountLink" sidebar="false" id="page">

      <apex:form >
      <apex:actionFunction action="{!search1}" name="callingApex" reRender="idBlock1"/>
      <apex:pageBlock Id="idBlock">
      <apex:inputText value="{!searchString}" onkeyup="callApex()" />
      <apex:pageBlockButtons >
      <apex:commandButton value="search" action="{!search1}" rerender="idBlock1"/>
      </apex:pageBlockButtons>

      <apex:pageBlockTable value="{!acct}" var="account" id="idBlock1">
      <apex:column headerValue="Account Name" >
      <apex:commandLink value="{!account.name}" action="{!Link}" reRender="idPage">
      <apex:param value="{!account.Id}" name="ContactsShow" assignTo="{!linkId}" />
      </apex:commandLink>
      </apex:column>
      <apex:column >

      <apex:pageBlockTable value="{!con}" var="contact" id="idPage">
      <apex:column value="{!contact.Description}"/>
      <apex:column value="{!contact.Id}"/>
      </apex:pageBlockTable>

      </apex:column>
      </apex:pageBlockTable>
      </apex:pageBlock>
      </apex:form>
      <script>
      function callApex()
      {
      callingApex();
      }
      </script>
      </apex:page>

       

      Hope this helps.

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    application solution

    Popular Salesforce Blogs

    custom notifications

    Custom Notification Using Apex | Salesforce Developer Guide

    Blog in Salesforce Apex

    Custom Notification  Custom notification may be a made-to-order notification within Salesforce org. We are able to use this feature to send notifications once any vital…

    Apex Triggers, API, Custom Notification, Record, Record Page
    Romil Mar 31, 2022
    12,259  Views
    What is Salesforce

    What is Salesforce? Learn About Salesforce Products Here

    Blog in Salesforce, Salesforce Products

    Routine Automation collected all you need to know and combined it into an introduction to Salesforce. What does Salesforce do exactly? How to use Salesforce? In…

    Audience Segmentation, Automation Studio, B2B Commerce, B2C & B2B, B2C eCommerce
    Routine Automation Oct 26, 2022
    1,533  Views
    salesforce url hacking

    Salesforce URL Hacking Button for Lightning Experience

    Blog in Lightning, Salesforce

    The Salesforce Lightning URL Hack is a strategy for making an extraordinary hyperlink or content and uncovering it by means of catch or recipe field.…

    API Field Name, Business Account Page Layout, Classic URL Hacks, Custom Action, Custom Actions
    Pooja May 7, 2020
    12,553  Views

    Popular Salesforce Videos

    Get Started with Admissions Connect | Salesforce Tutorial

    Get Started with Admissions Connect | Salesforce Tutorial

    Video in Salesforce Training

    Ready to simplify the application process and streamline the work of your admissions professionals? Enter: Admissions Connect! This is the purpose-built product built natively on…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, Salesforce Learning
    Vivek Jun 29, 2022
    1,735  Views
    Adding an Email Service Channel with Email-to-Case | Salesforce Tutorial

    Adding an Email Service Channel with Email-to-Case | Salesforce Tutorial

    Video in Salesforce Training, Salesforce Admin

    Learn how to add an email service channel with Email-to-Case. This feature will enable you to resolve and correspond with customer inquiries via email without…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, email to case
    SkyPlanner Nov 28, 2023
    1,077  Views
    Introduction To Salesforce | Salesforce Training Videos For Beginners

    Introduction To Salesforce | Salesforce Training Videos For Beginners

    Video in Salesforce Training

    Are you confused to choose the best edition tool? For CRM and Branding then here is the information for you! Salesforce is one of the…

    Salesforce Training, Salesforce Tutorial, Salesforce Development, Salesforce1, Salesforce Software
    Pooja Jan 10, 2018
    2,006  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    Try AuditMyCRM - It is a Salesforce CRM Audit tool which comprehensively scans your Salesforce org and gives you the list of errors or warnings you need to take care of.
    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.