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
Natasha AliNatasha Ali 

Lightning Alternative to window.parent.location.href JS Button

Hi,
I have a List Button that executes JS: 

{ 
window.parent.location.href="/a0O/e?CF00N20000009wZ17={!Application__c.Name}&CF00N20000009wZ17_lkid={!Application__c.Id}"; 
}
It creates a new offer & prefills 2 fields. I was unsure how to convert this into a Lightning ready button as it works the exact same in classic and lightning.

Many Thanks,
Natasha :)



 

 

Pradeep SinghPradeep Singh
Hi Natasha,

You cannot use URL hacks for lightning.But, you can Use Quick Actions to pre populate the values. Refer https://developer.salesforce.com/blogs/developer-relations/2016/09/take-the-first-steps-ways-you-can-replace-javascript-buttons.html