Sep 28, 2024
66 Views
Comments Off on A Gift! for Salesforce Developers – Automatically convert Existing Visualforce Pages to Lightning (Beta)
0 0

A Gift! for Salesforce Developers – Automatically convert Existing Visualforce Pages to Lightning (Beta)

Written by

Yes!  that’s right. It’s a beautiful gift from Salesforce, giving us (developers) the ability to code in both Lightning Experience and Classic without having to struggle with the different 3rd party styles sheets to match with the Salesforce Lightning Experience UI.

It has always been a big hesitation for many of the Salesforce Developers, to convert the existing VF pages to Lightning Experience UI. Developers were often pushed (unwillingly) to convince our customers to use the same theme as in classic and to just bring in the VF pages to Lighting Experience as it is, with very minor style changes. Reason behind this is that developer is often pushed towards taking up an additional UI designer role to his/her development of the core business process in Apex/Visualforce.

In Winter’18 Salesforce has introduced a new attribute for the Visualforce pages in Salesforce. “LightningStylesheet” is the Magic Word. All you need to do is add this as an attribute to the existing Visualforce pages <apex: page> tag and….. BOOM! Your Visualforce page turns into a Lightning page.  How simple is that? Now the Salesforce Developer can concentrate on the business process logic in the Apex and Visualforce without wasting time in UI/UX designing. The UI theme/styles part is taken care of automatically.

So let’s see how this works in a real-world example. Let’s consider a simple contact form where we have coded the page to capture the First Name, Last Name, Phone,  and email of a person.  Let’s see how it works when we flip the LightningStylesheet flag ON and OFF.

So this is again another sign we should start moving towards Lightning Experience. Now it’s more smooth and easy to adopt for both Developers and Customers.  What else we need from Salesforce as a Christmas’17 Gift to our hard working Salesforce Developers Community.

Article Categories:
Blog
Ramya Singh
https://thestarbiznews.com

Ramya Singh isn't your average tech blogger. Sure, she's got the brains to understand the latest algorithms and the jargon to explain them in plain English. But she's also got a twinkle in her eye and a way of weaving technology into the fabric of everyday life that makes it nothing short of fascinating. Whether she's reviewing the latest smartphone, exploring the potential of virtual reality, or delving into the ethical implications of artificial intelligence, Ramya does it with a contagious enthusiasm that makes you want to learn more, do more, and be a part of the exciting world of tech. So, if you're looking for a tech blog that's informative, inspiring, and just plain fun, follow Ramya Singh. She'll take you on a journey through the ever-evolving landscape of technology, and you might just find yourself a little bit more tech-savvy (and a lot more excited) along the way.