0

I have a custom object "Bodies of Water". My client wants to be able to create new opportunities directly from this object with two fields already populated (The body of water name itself, and the name of the account it's attached to). Both of these fields are lookups.

Currently, only the Body of Water name is populating properly, and I need to get the account one functioning as well.

I realize that the account name lookup field is a standard field on the opportunity object - how can I find the proper ID for this so that it will autopopulate?

This is the current code that I have. The second ID is not correct.

/006/e?CF00N55000000cmIn={!Bodies_of_Water__c.Name}&CF00N55000000cmIO_lkid={!Bodies_of_Water__c.Account_Name__c}

Any thoughts?

Thanks!

1

Once you are in the edit pavev, Use mouse right click to view page source and find the id from there. I have done it couple of times and it works like a magic.

0

Try this:

/006/e?CF00N55000000cmIn={!Bodies_of_Water__c.Name}&CF00N55000000cmIn_lkid={!Bodies_of_Water__c.Id}&opp4={!Bodies_of_Water__c.Account__c}&opp4_lkid={!Bodies_of_Water__c.AccountId__c}

For each lookup field, you want to pass both the name and the id of the record, since only passing the name will cause you to have to select the correct one in case multiple records share the same name.

As mentioned in previous answer, you can get the field id by right-clicking and selecting Inspect Element.

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.