There is a nice tutorial that explains how to hack the URL here.
Step 3 – Pre-populating lookup values
You may have noticed that if you are following a similar example to
mine, your lookup value will not be pre-populating like the default
“New” button does. This is because behind that new button, Salesforce
is bringing over the value from the previous object, as our button is
fresh, we will need to do this ourselves (and with any other lookup
values we have). They do differ slightly from basic text values which
I will explain below.
To populate a Lookup value we need the field ID as before but this
time we need to add CF to the front of the ID so it looks something
like this – CF00Ni000000EpsgO. This is required when populating a
custom lookup field. The first part to populate a lookup value is to
grab the name of the record we are populating. So using the method
before but with the added CF you can expect your button URL to look
like this
`/a0U/e?CF00Ni000000EpsgO={!Opportunity.Name}`
The next step is to grab the ID of the record we wish to populate.
This time though, we are going to add “_lkid” to the end of our field
ID (plus the CF we added on earlier). This lkid parameter is telling
Salesforce this is a lookup field. So it looks a bit like this.
/a0U/e?CF00Ni000000EpsgO={!Opportunity.Name}&CF00Ni000000EpsgO_lkid={!Opportunity.Id}
Again nothing too fancy we’ve just added some extra parts to the ID
and referenced this field twice, grabbing the ID and the Name of the
record. Please note the “&” used to separate the URL when referencing
different fields. You can also see this being used below where I have
the full URL used for this demonstration.
/a0U/e?CF00Ni000000EpsgO={!Opportunity.Name}&CF00Ni000000EpsgO_lkid={!Opportunity.Id}&00Ni000000EpsgY={!Opportunity.Description}
Your URL with notes
/a0H/e?CF00ND0000005Mxeb={!Contact.Name}&CF00ND0000005Mxeb_Ikid=**(DUPLICATE PARAMATER AND MISSING MERGEFIELD)**CF00ND0000005Mxeb_I(SHOULD BE l not I)kid={!Contact.Id}&CF00ND0000005MxeW={!Account.Name}(MISSING ID FIELD)&retURL={!Contact.Id}
Updated URL
/a0H/e?CF00ND0000005Mxeb={!Contact.Name}&CF00ND0000005Mxeb_lkid={!Contact.Id}&CF00ND0000005MxeW={!Account.Name}&CF00ND0000005MxeW_lkid={!Account.Id}&retURL={!Contact.Id}
&CF00ND0000005MxeW_lkid={!Account.Id}
should do the trick. You seem to have done that for contact, passing not only the name but the id as well (although there looks to be a mistake by addingCF00ND0000005Mxeb_Ikid=
twice).