You need to sign in to do that
Don't have an account?

Create a related contact using URL hack passing AccountId
I am trying to create related conact to an account passing the accountid into the url,url heck doesn't work properly when JS hits the url and opens a new window ' Account name doesn't auto populate in the new contact window in Lightning'-
https://dharmendraex-dev-ed.lightning.force.com/lightning/o/Contact/new?Accountid=0017F00000C34HOQAZ
Am I missing something? Please help me out on this .
https://dharmendraex-dev-ed.lightning.force.com/lightning/o/Contact/new?Accountid=0017F00000C34HOQAZ
Am I missing something? Please help me out on this .
Hope this helps!
Prady01
Thanks for your reply. Please guide me with a proper approach ,so that I can proceed on this.
Thank you
1) There is standard way. This is standard out of the box functionality in salesforce. The fields displayed will be dependent on the object kayout you are showing up in the POP-UP. Even in this we can pre-populate the fields that are necessary.
2) This is custom way to do it. Here you will have to create a lighting quick action component. Even in this if you create record event you can prepopulate the necessary fields.
Hope this helps!
Prady01
const parsedUrl = new URL(window.location.href);
and get the value using parsedUrl.searchParams.get("accountid")