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
Gopinath NarasimhanGopinath Narasimhan 

New Case button URL hack in Lightning

We have created a new case button and placed this custom button in the account related list.

Button Definition:
/500/e?retURL=%2F500%2Fo 
&cas4_lkid={!Account.Id} 
&CF00N0q000000GN5a={! $User.LastName } 
&RecordType=0120q00000007Aa

The above button is working for classic users but when switched to lightning experience this button is working and auto-populating other fields except for "Account ID".

What do we have to do for the above button populate "Account id" also in Lightning? 

 
Veena Sundara-HeraguVeena Sundara-Heragu
It is explained in this trail 
https://trailhead.salesforce.com/en/modules/lex_javascript_button_migration
In the second Unit
https://trailhead.salesforce.com/modules/lex_javascript_button_migration/units/javascript_button_alternatives
About half way down the page (look for "Prepopulate Fields with Values")