2

we have some requirements for which we need to build-up buttons like "javascript button" enabled for Classic version of SF.

If I would like to reproduce the same behaviour in lightning the only way in which I can do this using "Quick action", can't I?

Otherwise, I might use lightning component embedded into a visualforce page, but I've a problem while refreshing the record detail view (it seems you should use only window.reload() or something similar to do that), so I won't be able to get field updated into the view as long as I won't refresh the page.

Do you have any suggestion regarding this issue?

  • I don't understand what is missing from the quick action solution, which should be best practice, please explain what you want to achieve. – Itai Shmida Jul 6 '17 at 5:19
  • I've been reading a bit of quick action, the only thing I would like to avoid is to show every time I click the action the modal box. – Fabio Maturo Jul 6 '17 at 10:13
  • I understand, it is not nice, but you can make it disappear by entering $A.get("e.force:closeQuickAction").fire();. You will still see it for 1 second, but I think it is a better solution than all other workarounds. – Itai Shmida Jul 6 '17 at 11:42
  • window.reload might take longer because it refreshes the whole page with the lightning logo and all. What might be done is after the field update is done, you can call the method responsible for fetching all the data again. This will refresh your view without refreshing the page. – Mohit Arora Jul 7 '17 at 5:50
  • @ItaiShmida yes I added this method, it's not a good thing for the UI, but It seems to be the only way to fix this issue so far. – Fabio Maturo Jul 11 '17 at 14:35

Your Answer

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

Browse other questions tagged or ask your own question.