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
sindhu yandrasindhu yandra 

list button not working in lightning where as it is working classic ....

Hi 

I have created a list button and it is not working in lightning where as it is working classic. Please help me out.
NagendraNagendra (Salesforce Developers) 
Hi Sindhu,

You can create the global action using VF page. And on the click of that global action visual force page will open up and it will simply redirect to the URL where you want to redirect.

This will open the URL on the same window not in another window.

Use the following in the script of the VF page :-

window.open(“/one/demoPage”,”_parent”);

Where demoPage is my VF page.

Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra
sindhu yandrasindhu yandra
Hi Nagendra,

I have created a Visualforce Page  as follows and assigned to list button. You can see the code below :

<apex:page standardController="Address__c" recordSetVar="Addresscreation">
<apex:includeScript value="/lightning/lightning.out.js" />
<apex:slds />
<div id="lightning" />
<script> //Tell your Visualforce page to use ExposeVF Lightning app $Lightning.use("c:AddressCreation", function()
{ // Write a function that creates the component on the page $Lightning.createComponent("c:AddressCreation", {"recordId":"{!$CurrentPage.parameters.Id}", "invokedBy":"AddressCreation" }, "lightning", function(cmp) { }); });
</script>
</apex:page>
Raj VakatiRaj Vakati
<apex:page standardController="Address__c" recordSetVar="Addresscreation">
<apex:includeScript value="/lightning/lightning.out.js" />
<apex:slds />
<div id="lightning" />
<script> //Tell your Visualforce page to use ExposeVF Lightning app $Lightning.use("c:AddressCreation", function()
{ // Write a function that creates the component on the page $Lightning.createComponent("c:AddressCreation", {"recordId":"{!$CurrentPage.parameters.Id}", "invokedBy":"AddressCreation" }, "lightning", function(cmp) { }); });
</script>
</apex:page>

insted of the {!$CurrentPage.parameters.Id} set from the apex class 
sindhu yandrasindhu yandra
Hi Raj,
I tried but it is not working......Can you please help me on this it will be life saving....