+ Start a Discussion
Mitchell McLaughlin 10Mitchell McLaughlin 10 

JavaScript in Visualforce Page!

Hi All,

Lately, I've seen some JavaScript in vf pages. On the opportunity line item object, I cannot create a lightning component, as lightning actions are not supported. Is it possible to replace a javascript button with just opening a new vf page and using javascript using <script> ??
ProlayProlay
The only options to invoke lightning components from OLI related list is first to invoke VF page then a lightning component.
You can vote for this idea - https://success.salesforce.com/ideaView?id=0873A000000cNKbQAM
Deepali KulshresthaDeepali Kulshrestha
Hi Mitchell ,

You might look at this stackexchange post (https://salesforce.stackexchange.com/questions/101733/convert-javascript-button-to-vf-page-button)
that provides an example of convert Javascript button to VF page button (not the same situation, the same principles apply).

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

 Thanks and Regards,
 Deepali Kulshrestha