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, 4 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

    Mastering Salesforce Marketing Cloud Email Studio: Step-by-Step Guide

    Mastering Salesforce Marketing Cloud Email Studio: Step-by-Step Guide

    Blog in Others

    The area of digital marketing is dominating nowadays, and customer engagement determines the success of any business. So, Salesforce Email Studio Marketing is the right…

    Automation, Campaign Objectives, Click-Through Rates, Content Personalization, Conversions
    Icecube Apr 25, 2024
    988  Views
    covid response solution

    Instantly Deploy Free COVID-19 Care Response Solution with Global Salesforce Implementation Partner

    Blog in Salesforce

    World leaders and global health care providers are overwhelmed with inbound calls and an amplified number of cases they are receiving each day affected by…

    Artificial Intelligence, Communities Cloud, Community Cloud, CRM, Customer Data
    Reena Jun 8, 2020
    16,229  Views

    3 Hot Trends Secretly Pointing towards Future of CRM

    Blog in Others

    Customer Relationship Management or CRM is the future of the business and is not going to fed so soon. Starting from small businesses to the…

    CRM, CRM Implementation, CRM Softwares, CRM System, CRM Technology
    Dream Cyber Jun 19, 2019
    2,268  Views

    Popular Salesforce Videos

    Introduction to Salesforce Apex for Developers

    Introduction to Salesforce Apex for Developers

    Video in Salesforce Apex, Salesforce Training

    Have you ever wanted to write a Trigger in Salesforce? This workshop is designed for people who would like to begin learning the basics of…

    Apex Data Loader, Salesforce Apex Class, Salesforce Apex Tutorial, Salesforce Apex Tutorial For Beginners, Salesforce Apex Programming
    Abhay Feb 15, 2018
    1,743  Views
    Getting Information from your Salesforce Account for a Salesforce Connection

    Getting Information from your Salesforce Account for a Salesforce Connection

    Video in Salesforce Stories

    Watch this video to learn how to get information from your Salesforce Account for a Salesforce Connection. Do let us know in the comment section…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, Salesforce Account
    Pooja Jun 17, 2022
    1,269  Views
    Open Facebook Messenger and Send Message using Lightning Component Salesforce | Salesforce Tutorials

    Open Facebook Messenger and Send Message using Lightning Component Salesforce | Salesforce Tutorials

    Video in Salesforce Training, Salesforce Development

    In this video you will learn to open Facebook Messenger and send message to users using their facebook's username. We will create a quick action…

    Salesforce Training, Salesforce Tutorial, Salesforce Development, Salesforce Lightning, salesforce
    Kapil Jul 16, 2020
    2,198  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

    © 2025 - 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.