Search code examples
salesforcesalesforce-lightning

Salesforce JavaScript button in Lightning


We have some buttons on our contact page that via javascript update a handful of hidden fields on the object. We are moving to the lightning UI and I understand these are not supported, but am struggling to decipher the documentation on the best replacement. Can someone help point me in the right direction.

Requirement is to update several fields on the contact that is currently on the screen... nothing more, other than we don't use chatter so nothing with the feed please.


Solution

  • The Winter 17 release included the ability to create Actions based on Lightning Components. This is most likely the way you will want to go to convert your existing JavaScript buttons. I would suggest you check out this new Trailhead that was just released which is specifically about Lightning Alternatives to JavaScript buttons.

    I am also working on a course for Pluralsight about Lightning development and this is one of the areas I plan on covering since it is so applicable to a lot of people right now. I am not sure if you realize this but by next year, any JavaScript buttons you have will no longer work (even in classic). It is part of a 3 phased approach that Salesforce is implementing to phase them out for security reasons.

    Good luck in your conversion. I wish I could say it will be easy, but at least now it is possible.

    Best. Sara