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
babitha kurianbabitha kurian 

Lightning: Create a URL button in case object which opens up custom object create new page with pre-populated values from case

We are migrating our code to lightning. We have a javascript button in case object which opens up a custom object create new record page with pre-populated values from case. How can i do the same thing in lightning?.
We tried multiple ways but the values are not getting populated. The custom object got 2 lookup fields for case and contact. Which i need to pre-populate.
srcUp('/{!$Setup.customSetting.Prefix__c}/e?{!$Setup.customSetting.Case_Field__c}={!Case.CaseNumber}&{!$Setup.customSetting.Case_Field__c}_lkid={!Case.Id}&{!$Setup.customSetting.Contact_Field__c}={!Contact.Name}&{!$Setup.customSetting.Contact_Field__c}_lkid={!Contact.Id}') --field IDs we have saved in the custom setting in the above.

The option i could think of is lightning componet calling in quick action but If i go with quick action since feed is enabled, the button will appear below the feed only. client ddnt like that.
is there nay way to bring the quick action to the  header? or any ways to achive the above without a lightning component. Please help!