function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Peter BölkePeter Bölke 

Lightning and URL hacking to prefill fields

Hello,

i am strungeling with a custom "create"-Button. I want to select a recordtype and submit a parameter to prefill a field. Selecting a recordtype works, but submitting a value does not.

Can anyone give me an advice? I was looking around the web and tried some suggestions but nothing helps. 

Important: i am on Lightning!

My code:
var newTestpoint = $('<a href="/a0B/e?&ent=Warengruppen_Struktur__c&CF00N0O00000AfEAi='+node.title+'&CF00N0O00000AfEAi_lkid='+node.key+'"> neuer Endpunkt | </a>');
                    $nodeSpan.append(newTestpoint);



thanks
Peter
Best Answer chosen by Peter Bölke
Mansi RaoMansi Rao
Hello Peter..

Have a look at this web page that may help you or give you some information regarding your concern.

Although Salesforce does not officially support URL hacks, many of us use them to address a number of use cases.
With the introduction of Lightning Experience this option is restricted because:
If you use URL custom buttons to pass parameters to standard pages in Salesforce Classic—such as pre-populating fields when creating a record—this behaviour doesn’t work in Salesforce1 or Lightning Experience.
Original Post (https://www.linkedin.com/pulse/salesforce-lightning-url-hacking-alternatives-keith-mcrae)

All Answers

Mansi RaoMansi Rao
Hello Peter..

Have a look at this web page that may help you or give you some information regarding your concern.

Although Salesforce does not officially support URL hacks, many of us use them to address a number of use cases.
With the introduction of Lightning Experience this option is restricted because:
If you use URL custom buttons to pass parameters to standard pages in Salesforce Classic—such as pre-populating fields when creating a record—this behaviour doesn’t work in Salesforce1 or Lightning Experience.
Original Post (https://www.linkedin.com/pulse/salesforce-lightning-url-hacking-alternatives-keith-mcrae)
This was selected as the best answer
Jayanth ThathapudiJayanth Thathapudi
Please upvote for URL hacking in Lightning

https://success.salesforce.com/ideaView?id=0873A0000003W5qQAE
{tushar-sharma}{tushar-sharma}
Now URL hack is supported in Lightning Experience. Check below post for detail and code sample: 
https://newstechnologystuff.com/2020/06/03/salesforce-url-hack-in-lightning/