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
KelseyBKelseyB 

converting javascript button to lightning

I ran the Lightning Experience Configuration Converter for JavaScript buttons and I only have one button. However, it's on the Opportunity Line Item object, and I'm getting an error that says "OpportunityLineItem object isn't supported". How do I deal with this button conversion?
I thought I could create a Quick Action on the Opportunity Product object, but it's not even an option. Any ideas on another route I could go? The button sits on the Opportunity Product record and clones the existing record with pre-populated pricing and cost fields on an edit screen.
It was suggested in the Lightning Now trailblazer community that I would need to write custom code. However, that's way out of my wheelhouse. I was hoping someone could help provide me some direction. 
Mitchell McLaughlin 10Mitchell McLaughlin 10
Kelsey, did you hear back on this? Im looking for the same answer. I wonder if it's possible to embed javascript in a VF page and use a custom button to open the VF page, hence kicking off the Javaascript.
KelseyBKelseyB
Hi Mitchell, I'm by no means a developer so my wording is most likely incorrect but I ended up creating a new button in Lightning, with the content source being a VF page. Clone is the original button that did not work in Lightning, and Clone2 is the new one I created that does work. Hope that helps!
User-added image
Mitchell McLaughlin 10Mitchell McLaughlin 10
What is included in the VF page though? Are you executing javascript in the page?
KelseyBKelseyB
Like I said, I just don't know enough about the development side to know the answer to your question. But here's the code and maybe that'll help. User-added image
Mitchell McLaughlin 10Mitchell McLaughlin 10
Yes. You converted javascript into a VF page. Doesn't fit my requirement, but nice! :) thanks for the reponses!