+ Start a Discussion
Shawn Low 37Shawn Low 37 

I wanted to ask if it's possible to create a "Button" on the Opportunity that does the following when clicked:

1. Chamnges the Owner to a Queue
2. Updates the Page Layout

Is this possible?
This new button also needs to work on a Lightninig Web Component that we are building. Is this possible?
Would it be JavaScript (I know, Lightning hates Javascript) or a URL or what?

Meghna Vijay 7Meghna Vijay 7
Hi Shawn,

What do you mean by Updates the Page Layout ? Is it showing a different page Layout (Standard)? If yes then you can change the record type of opportunity to show a different page layout.
Both the points can be done via Apex Controller .
Here's a link for apex controller in lightning web components:-

Hope it helps, if it does mark it as solved.