-1

In Salesforce Lightning I am trying to make a button on the case layout which assigns a case to the user viewing it. I want this button to be a single click and the case owner is reassigned and the page is refreshed to show the new owner. There are a lot of examples of this working with JavaScript in Salesforce classic but Salesforce Lightning does not support JavaScript buttons on layouts so I can not figure out how to accomplish this.

2 Answers 2

0

You can use a button that starts a flow, the flow can reassign the case and you can use a lightning web component on a flow screen with some javascript to refresh the page.

0

You can create an "update a record" action. Set the predefined value of Owner field to current user and remove all fields from layout.

This will allow you to have a 2 clicks update.

If you really want one click, you will need to make a headless quick action. This involves some development whereas the other method only use point&click.

1
  • Can't set Owner in a predefined field value. Unfortunately.
    – Ray
    Jan 31 at 16:17

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.