1

I have the need to change the field that is clicked on to specify a particular record on the Product lookup layout. I can create a custom page if need be but I am curious if there is a way to use the HYPERLINK function in a formula to dynamically create a link that can be clicked on instead of the Name field. I understand that I will not be able to remove the Name field from the page layout - I will have to switch it to a Auto-Number field before it can be removed.

I am curious whether or not anyone else has come across something like this. I was unable to find anything on it already.

EDIT:

Looking at the above picture - I am trying to click on the Product Code custom field in the lookup dialogue box instead of having to click on the Product Number field in order to populate the Product Lookup field on the Page where the lookup icon was clicked. The page behind is a custom visualforce page so I do have control over what happens if that opens up any possibilities to me.

I have created an entirely new lookup field module with a custom visualforce page in order to resolve the issue I am facing - which is working for our use case. I am now just generally curious if this is possible going forward.

1
  • As far as I know, there is no native way to use a different field other than Name to search for a related record in a Lookup field. However, I have sometimes added the product code into the Name field, so users can search for it that way. E.g. 6190154P-3 -- "A" BUS ADAPTER W/1000A SHUNT May 30, 2014 at 18:25

1 Answer 1

0

Chris, exactly are you trying to navigate to? And for what type of user?

The HYPERLINK() can be used to create dynamic URLs that leverage Salesforce's well known URL structure to create new navigation options. For example, the formula below will enable internal users to click your formula field on a Product detail page to create a new asset using that product.

HYPERLINK(
    "/02i/e?retURL=%2F" + Id + "&Product2_lkid=" + Id , 
    Name
)
5
  • I want to create a field that can be added to the Lookup/Search page layout that will work with the standard lookup functionality. This will replace the name field and still allow me to select that product by clicking on this new field. This will then add that product the lookup field on my Custom Object edit page.
    – Chris
    May 30, 2014 at 2:43
  • Hello, Chris, I think the HYPERLINK() sample I posted can be tweaked to work in the search scenario you described. Take a look at this video: screencast.com/t/X2ihJbrcn
    – Marty C.
    May 30, 2014 at 3:04
  • Using that video - I do not want to prepopulate a page layout with a lookup value when navigating to it. I want to click on the magnifying class and find a record to associate to a lookup value. After the Lookup pop up box is displayed - I am trying to click on a custom field, not the Product Name or Product Number to then populate that lookup field.
    – Chris
    May 30, 2014 at 3:24
  • I'm sorry, Chris. I don't think I understand what you're trying to accomplish. If you could provide a more specific example or a step-by-step description of the desired user experience, perhaps I can give a better answer.
    – Marty C.
    May 30, 2014 at 3:29
  • I edited my question to be more thorough. Thanks for taking a look.
    – Chris
    May 30, 2014 at 15:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .