I have the following URL hack but it is not working any ideas? The Asset.Account is a lookup field, is that the issue?


  • 2
    What exactly do you mean by "it is not working?" Please be more specific.
    – Adrian Larson
    Commented May 19, 2015 at 14:10
  • 1
    check what the following fields are returning. {!Asset.Account} , {!Asset.AccountId} by placing them in the alert. one more correction in your URL you closed } for Asset.Account twice. try to correct it. If this answers I post it as solution let me know.
    – Suresh
    Commented May 19, 2015 at 14:11
  • Where is the button located? You are opening the Asset edit page, so this would mean that you have a button on Asset that tries to create a new Asset and puts the Asset.Account into some other custom lookup field? Commented May 19, 2015 at 14:28

3 Answers 3


Looks like "{!Asset.Account}}" contains an extra "}".

Hope this is the issue.

  • Just a post copy issue there, no }} in my actual URL
    – BCBART
    Commented May 19, 2015 at 14:19
  • Where are you trying to use the URL? Can you provide more details? Commented May 19, 2015 at 14:30

You need to do a URLENCODE of Asset.Account. It is not working because your account has a White Space, ',' that the Browser can't resolve.

Your correct URL is

  • Ok here is where I am with this now, I realized I needed to make some changes to my original , The Custom Object is Deployment, I wnt to populate the Account field when I create a new Asset record which is a related list on Deployment/02i/e?CF00NW0000000mpDu={!URLENCODE (Deployment__c.Account_Name__c)}&CF00NW0000000mpDu_lkid={!Deployment__c.Account_NameId__c}
    – BCBART
    Commented May 20, 2015 at 16:40
  • you need create a cutom button in the asset object with your url => '/02i/e?CF00NW0000000mpDu={!URLENCODE (Deployment__c.Account_Name__c)}&CF00NW0000000mpDu_lkid={!Deployment__c.Account_Nam‌​eId__c}'. In the button you need specify that is a List button. After that you need modify deployment's page layout => go related list => modify and add the new button.
    – Torsen
    Commented May 22, 2015 at 9:06
  • Still having trouble the Account Field on the Assets does not populate from the Account field on Deployment when I create a new Asset record.
    – BCBART
    Commented May 28, 2015 at 18:13

Missed a '+' sign between the two field values. It's always encouraged to pass the field id's dynamically to avoid problem when it's moved to production.

var url="/02i/e?CF00NW0000000mpDu={!Asset.Account}"+"&CF00NW0000000mpDu_lkid={!Asset.AccountId}"

Pass lookup field Id dynamically on button click

How to get the entity ID for a custom field in Apex?1

  • 1
    You can find the difference and btw this is not from any dumps, Ask further help from experts who are here judge the answer.
    – SFDC
    Commented Oct 24, 2017 at 5:11

You must log in to answer this question.

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