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
Paula Vogler 27Paula Vogler 27 

List View (URL) button not working correctly when migrating to Lightning

I'm hoping someone can assist me with an issue I ran into when migrating to lightning. We have a button on an Accounts related list (it is a custom object) that creates a new record, auto setting the Account lookup field it is created from on the new custom object record. Once I enabled lightning and tried to use it, the button still works on the Lightning page BUT the Account is no longer set. I am not familiar with the URL button and have no resource available to me to assist with a solution.Attached is a screenshot of the button details:User-added image
Maharajan CMaharajan C
Hi Paula,

Classic URL hack button won't  work in Lightning. So you have to create separate custom list button for lightning with lightning URL hack or custom detail page button with lightning URL hack or Custom actions.

In Classic URL we will use the Field Id's for pre population but in lightning you have to use the field api names for prepopulation.

Sample is below : Create New Contact from Account.
/lightning/o/Contact/new?defaultFieldValues=OwnerId={!Account.OwnerId},AccountId={!Account.Id},MailingStreet={!Account.ShippingStreet},MailingCity={!Account.BillingCity},MailingState={!Account.BillingState},MailingPostalCode={!Account.BillingStateCode},MailingCountry={!Account.BillingCountry}

https://www.salesforceben.com/salesforce-url-hacking-for-lightning-tutorial/

https://medium.com/creme-de-la-crm/spring-20-release-highlights-url-hacks-are-back-17f320c8bafb

https://thewizardnews.com/2020/01/27/url-hacks-are-back-and-in-lightning-with-spring-20/

https://newstechnologystuff.com/2020/06/03/salesforce-url-hack-in-lightning/

Thanks,
Maharajan.C
Paula Vogler 27Paula Vogler 27
Thanks for responding Maharajan.
I'm still confused as where to start...I didn't create the original button, that user is gone. I have never created a button myself, in Classic nor Lightning and I have no developer available to me. 
Would I start by creating a new button, with the same settings as the existing one?
User-added image

And then figure out the syntax in the body