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

    Test your Twilio’s trial account Inbound messages functionality

    Test your Twilio's trial account Inbound messages functionality with Text Now App

    Blog in Others

    Firstly, What is Twilio? Twilio is a US based web application which allows users to programmatically send and receive text messages, phone calls and perform…

    API, Caller ID, Inbound Emails, Inbound Messages, Menu Button
    shariq Sep 11, 2018
    5,564  Views

    Salesforce Einstein: Artificial Intelligence for Customer Success

    Blog in Salesforce Einstein

    Artificial Intelligence (AI) is endorsing a paradigm shift in the industry today. It sure has been a while since AI’s outset, but it was only…

    App Builder, Artificial Intelligence, Buiness, Business and Process Consulting, Communities Cloud
    Richa Mar 30, 2020
    2,855  Views

    Salesforce Sharing and Security Features

    Blog in Others

    Introduction: Salesforce provides different kinds of security levels like objects, field records, etc. Data is Stored in Objects, Fields, and Records in Salesforce. Salesforce uses…

    Custom Objects, Detailed Page, Manual Sharing, Multiple Users, Public Read-Only
    Anuj Feb 21, 2020
    10,220  Views

    Popular Salesforce Videos

    Escalation Rule in Salesforce

    Escalation Rule in Salesforce

    Video in Others, Salesforce Training

    In this video, Shrey is not only teaching but also demonstrating Escalation Rule in Salesforce. 1. What are Escalation Rules in Salesforce? 2. What is…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, Salesforce Learning
    Jogender Apr 19, 2021
    1,975  Views
    Create Custom App in Salesforce | Salesforce Custom App | Salesforce Tutorial

    Create Custom App in Salesforce | Salesforce Custom App | Salesforce Tutorial

    Video in Salesforce Training, Salesforce Apps

    Watch this amazing video to learn how to create a custom app in Salesforce. Salesforce is a cloud-based platform that has transformed how companies have…

    Salesforce Training, Salesforce Tutorial, salesforce, Learn Salesforce, Salesforce Video
    Pooja Nov 13, 2020
    2,242  Views
    Salesforce Diagram | Salesforce Diagramming Framework

    Salesforce Diagram | Salesforce Diagramming Framework

    Video in Salesforce Stories, Salesforce Training

    Diagrams help drive key project decisions, align delivery teams, and help everyone understand where you’re going and what’s been done. Consistent, easy-to-understand diagrams are a…

    Salesforce Training, salesforce, Salesforce Video, Salesforce Learning, Connectors
    Prafull Aug 5, 2021
    1,743  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.