0

I have a record where there are couple of custom fields which I have to pre-populate the values when I click a hyper link. This hyper link should be stored in as a custom formula field with return type text.

I am able to do this with a custom button - http://raydehler.com/cloud/clod/salesforce-url-hacking-to-prepopulate-fields-on-a-standard-page-layout.html but I am having hard time to figure out how to use a HYPER link with custom formula field to populate a custom field value.

So far what I tried is in my in my formula field I have:

https://csa3.salesforce.com/0013700000DBCYF?CF00N37000006dVvS=Engineer

Here CF00N37000006dVvS is a custom field of type text, which I want to populate with string called Engineer.0013700000DBCYF is the record id. But this is not working out.

  • You should know the drill. What have your tried, what issues are you running into? – Eric Oct 14 '16 at 4:34
  • Please see my edit – SfdcBat Oct 14 '16 at 4:40
3
HYPERLINK("/006/e?accid=" + Id , "New Opp")

In a formula field for example will create a new app with the accid populated

Little, hint: Click the new button and inspect the URL salesforce generate and mimic it

  • Hi , I used this - HYPERLINK("csa3.salesforce.com? Level__c=" + Id , "New Opp"). Is this correct? My custom field name is Level__c to which I wish to assign a value when I click this HYPERLINK. – SfdcBat Oct 14 '16 at 4:49
  • 1
    @SfdcBat - no. I suggest you do some reading up on urls. For custom fields you will need to use the ID's like you were before. And you can start by getting your hyperlink to simply take you to the edit record without the parameter as it seems you do not have an understanding of that yet. "relative urls" is something you should read up on as well – Eric Oct 14 '16 at 4:52
  • Thanks. This is helpful. With some reading I was able to populate the field value using a HYPERLINK, but I have to go to the edit page and populate the field value there. Is there a way to populate the field right away in the detail page with out going to edit page and clicking save button. This is the URL I have formed now - HYPERLINK("na3.salesforce.com/0013700000DBCYF/…" , "clicktoPopulateAValue") – SfdcBat Oct 14 '16 at 5:21
  • The only way to do that would be to use a VF page with an Action attribute to create the record and populate it according to the url params you pass, then redirect to the detail page. Or maybe one of the save=1 param will work. been a long time since I used that: help.salesforce.com/apex/… – Eric Oct 14 '16 at 5:22
  • Thanks. One last thing I am hardcoding the id in the HYPERLINK is there a way to use a variable there? like {!account.id} ? I used that but it is not valid – SfdcBat Oct 14 '16 at 5:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.