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

    Salesforce Lightning Web Components

    Salesforce Lightning Web Components: The new way of creating robust components for modern browsers

    Blog in Lightning

    Salesforce has been on a great journey with the Lightning modules. In 2014, Salesforce had launched the Lightning component framework that was supported by the…

    Aura Framework, Aura Programming Framework, Automobile Spare Parts Products and Services, Browser Interference, Build Lightning Components
    Softweb Aug 31, 2020
    3,163  Views
    Best Practices for Integrating AI into Salesforce CRM

    Integrating AI into Salesforce CRM: Best Practices

    Blog in AI and ML

    Table of Contents Introduction Best practices for integrating AI into Salesforce CRM Understand Your Business Objectives Choose the Right AI Tools Prepare Your Data Start…

    Automation Insights, CCPA Compliance, Continuous Improvement, Customer Interactions, Customer Trust
    Kizzy Consulting Jul 24, 2024
    575  Views
    Running Case Assignment Rules From Salesforce Apex

    Running Case Assignment Rules From Salesforce Apex

    Blog in Salesforce Apex

    Hi All, We all know that the Case Assignment Rule decides how cases are assigned to users or put into queues. We can create multiple…

    Case Assignment Rule, Case Routing, case trigger, Salesforce Apex, Salesforce Apex Code
    PRANAV Apr 13, 2018
    27,199  Views

    Popular Salesforce Videos

    Geocoding and Reverse Geocoding in Salesforce | Google Maps APIs

    Geocoding and Reverse Geocoding in Salesforce | Google Maps APIs

    Video in Salesforce Development

    In this video, you will learn to use Geocoding and Reverse Geocoding service in your Salesforce Org. Geocoding is the process of taking input text,…

    Salesforce Training, Salesforce Developer, salesforce, Salesforce CRM, Salesforce Org
    Kapil Jul 30, 2020
    2,907  Views
    Send WhatsApp and Save Chat using Lightning Component Salesforce | Salesforce Tutorials

    Send WhatsApp and Save Chat using Lightning Component Salesforce | Salesforce Tutorials

    Video in Salesforce Development

    In this video you will learn to send #WhatsApp using Lightning Component Salesforce. Also we will create a custom object to store the chat. Features…

    Salesforce Lightning, Salesforce Tutorials, Salesforce Developers, Salesforce Lightning Component, Salesforce Video
    Kapil Jul 6, 2020
    3,325  Views
    What is Salesforce - The CRM Bringing Companies & Customers Together

    What is Salesforce - The CRM Bringing Companies & Customers Together

    Video in Salesforce Stories

    Salesforce is the world’s #1 customer relationship management (CRM) platform. We help your marketing, sales, commerce, service and IT teams work as one from anywhere…

    Salesforce Training, Salesforce Tutorial, What Is Salesforce, salesforce, CRM
    Vivek Feb 9, 2022
    1,794  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.