On Contact I have one custom button where we want to give create opportunity functionality. It is working fine for most of the values but not able to populate the look up field. I tried below ways.
/lightning/o/opportunity/new?useRecordTypeCheck=1&nooverride=true&defaultFieldValues=Contact__c={!Contact.Id},
Name={!Contact.name}
Here Contact__c is the the lookup field of which label name Primary Contact ( API name Contact__c)
I tried below steps also but not working..
1) Right click on lookup field (not on lookup icon) and inspect element.
2) Copy the id of field. Now you have field id.
3) Put field id = '' in URL, try without space.
5) Now you can see that the value will be visible in lookup field.