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 

Added <apex:page lightningStylesheets="true"> tag to exisintg VF page but still not working in Lightning?

Hi, so I have an existing VF page which comes up when the custom button is clicked on the Account object. I've also checked the "Available for Lightning Experience, Lightning Communities, and the mobile app" box.

The page is a Calendar view. Here's the VF code before and after:

<apex:page action="/00U/c">
    <apex:ListViews type="Event"/>
</apex:page>

AFTER:

<apex:page action="/00U/c" lightningStylesheets="true">
    <apex:ListViews type="Event"/>
</apex:page>

It let me save the pages but doesn't work!
Here is the custom link button:
 

https://ldngroup.my.salesforce.com/00U/c?cType=2&md2=41&md0=2017 
It's working perfectly fine in Classic, just not in Lightning.

Any help is much appreciated!!
Thanks,
Natasha
Best Answer chosen by Natasha Ali
Chandrashekhar GoudChandrashekhar Goud

Hi Natasha 

 

I think the problem is with the attribute action="/00U/c" .  The action method is calling classic calender so you are not able to view the classic calender page in lightning.  You can use this code for lightning calender page .

<apex:page action="/lightning/o/Event/home"  lightningStylesheets="true">
    <apex:ListViews type="Event"/>
</apex:page>

If  you want more information follow below link .
https://developer.salesforce.com/docs/atlas.en-us.214.0.pages.meta/pages/vf_dev_best_practices_slds_lightningstylesheets.htm


If it helps you mark as best answer.

 

Thanks
Chandrashekhar Goud

 

All Answers

Chandrashekhar GoudChandrashekhar Goud

Hi Natasha 

 

I think the problem is with the attribute action="/00U/c" .  The action method is calling classic calender so you are not able to view the classic calender page in lightning.  You can use this code for lightning calender page .

<apex:page action="/lightning/o/Event/home"  lightningStylesheets="true">
    <apex:ListViews type="Event"/>
</apex:page>

If  you want more information follow below link .
https://developer.salesforce.com/docs/atlas.en-us.214.0.pages.meta/pages/vf_dev_best_practices_slds_lightningstylesheets.htm


If it helps you mark as best answer.

 

Thanks
Chandrashekhar Goud

 

This was selected as the best answer
Natasha AliNatasha Ali
Thanks Chandrashekhar,
Do I need to update the button URL too?

Natasha :)
Chandrashekhar GoudChandrashekhar Goud

Are you calling Vf page or url in the custom button ?

If you are using url, can u post the url.

Natasha AliNatasha Ali
The URL (already above) is: https://ldngroup.my.salesforce.com/00U/c?cType=2&md2=41&md0=2017 
Thanks! :)
Natasha AliNatasha Ali
User-added image
Chandrashekhar GoudChandrashekhar Goud
Yeah ... You have to change the url.
https://ldngroup.my.salesforce.com/lightning/o/Event/home?cType=2&md2=41&md0=2017


If it helps you mark as best answer.

Thanks
Chandrashekhar Goud
 

Natasha AliNatasha Ali
Hey Chandrashekhar,
That worked, thanks! Just one more thing, it doesn't show the booked events on the calendar? It'd be specific & tailored for the different users

Thanks
Chandrashekhar GoudChandrashekhar Goud

Yes... 

Its showing booked events for me.
User-added image



If it helps you mark as best answer.

Thanks

Natasha AliNatasha Ali
Hey Chandrashekhar,
I have all of these events booked next week but none are showing up on the calendar (the calendar button is on the record of account object)
User-added image



Calendar:
User-added image