Migrating Visualforce pages to Salesforce Lightning

Migrating visualforce pages to Salesforce Lightning
You know those complicated screens in your org? You are going to have to tackle them.

Our Advanced Salesforce Developer Simon Lawrence tells us how to migrate complex visualforce pages to Salesforce Lightning.

Do you have a screen in your business that looks a bit like this?

 

Visualforce page in Salesforce Classic

 

It’s not great, and why would it be – it has not been updated for about 9 years. That’s because nobody dares touch it. There are two reasons for this.

  1. It works but no one really knows exactly how it works
  2. It is business critical – the entire operation of your business could actually crash and burn if you took this one page away.

You might be surprised by just how often we come across one of these pages.

But now you have a problem because it’s this page that is stopping you from migrating to Lightning. You may well have given it a go e.g. you flipped the switch and took a look at what happened. In actual fact, at first glance, it did not appear to be too far wrong.

 

Visualforce page in Classic converted to Lightn

 

OK there is a space where the side bar used to be in Classic. The fonts have gone a bit haywire. It’s nothing that you can’t convince your team to get used to.

The problem occurs when you attempt to update the screen. That’s when you get one of these messages.

 

Visualforce page in Classic converted to Lightn

And nothing works. And with that, things just got complicated.

Lightning is incredibly tolerant in what can be brought forward from Classic. Therefore, if a feature of your org doesn’t come across smoothly, it’s probably for a very good reason; perhaps security model breaches, scalability issues – we commonly see major Cross-Site Request Forgery (CSRF) or Cross-origin resource sharing (CORS) issues on pages like this.

The time has come. You have to tackle this screen.

But let me reassure you, it will be OK.

It will be OK because you now have Lightning Components. Salesforce has now given us the tools and the knowledge to rebuild functionality in Lightning Web Components much, much faster than we were ever able to in Visualforce and Apex. Along the way, we now have the opportunity to make sweeping improvements to business processes, scalability and maintainability.

Goodbye complex, old skool ‘single page applications’, hello, dynamic, componentised Lightning web applications.

Still wondering how to make the first move? I would suggest you prepare by taking a look at the some of the information available on Lightning App Builder, IDE Plugins and Salesforce DX – I’ve included some useful links.

Good luck. Drop me a comment below if it gets really complicated and I’ll see if I can help.

Migrating visualforce pages to Salesforce Lightning
By Simon Lawrence
27 February 2019
Salesforce

Share this post

Catt to action

Amet aliquam id diam maecenas ultricies mi eget mauris

Lorem ipsum dolor sit amet, consectetur elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.