I've got a button that sends a contract to Docusign, but I'd rather the Sales Rep not be able to press it unless it meets certain criteria. In Classic, I can do a Javascript button. What's the best way to handle this in Lightning?

My initial thoughts:

  1. Visualforce page with redirect?
  2. Page Layouts are messy and wouldn't work due to the nature of the criteria.
  3. Some kind of Lightning Component?

There is a new lightning feature so you can set an action from a lightning component:

Configure Components for Custom Actions

And this is a good example how to do that:

Winter’17: Using a Lightning Component from an Action

I believe this is the best practice for your requirement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.