plz suggest. I have a custom object " Asset" and a child object " Car Accessories" ( master-detail relationship). i have created a custom button " Add New" on car access. object to create a new records,the reason being,,  i want a particular " name" to auto-appear (TBA) as the name in the new records. But even if the names is appearing OK, the related asset ID is not showing in the look up field. can anybody plz suggest where i went wrong? Below my javascript code for the new button,


enter image description here

The result being as per below, I am missing the related asset from where i have created the new record. It should appear.

enter image description here

In the new record the URL showing is as below, The name of the related Asset record is " test" which is showing in the URL but not in the detailed page. plz suggest. Thanks  https://cs6.salesforce.com/a36/e?retURL=%2F02iN0000001aYvG&assid=02iN0000001aYvG&Name=TBA&00NN0000002GOcY=test


The Asset field is waiting for an Asset Id. It will show the Asset name automatically. Here's what i suggest:

| improve this answer | |
  • Hello, Martin. Thanks. I tried this one but till the look up field is not populating. Instead i can see in the URL teh related asset ID "cs6.salesforce.com/a36/…" – sourav Jan 11 '17 at 8:11
  • I edited my answer. Can you try this? – Martin Lezer Jan 11 '17 at 8:16
  • Hi Martin, I tried. But till no success. Although the valus n IDs are appearing in the URL only " cs6.salesforce.com/a36/…". The look up is master-details, i hope thts not an issue. Thanks – sourav Jan 11 '17 at 8:21
  • How did you get the field Id? Using the Google Chrome console to inspect the field? – Martin Lezer Jan 11 '17 at 8:24
  • Nope, I went to the related field in the " Car Accessories" object, the API name is Asset__c for the look up field. Here i have taken the ID from the URL " cs6.salesforce.com/00NN0000002GOcY?setupid=CustomObjects". Also, if i use the standard button for new record rather than the custom button , this is the URL showing " cs6.salesforce.com/a36/…". Thnx – sourav Jan 11 '17 at 8:29

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.