Register and dispatch events
Learn how to register and dispatch events in Aura components and LWC.
Zuora CPQ
list_alt
Learn how to register and dispatch events in Aura components and LWC.
Aura example:
<aura:registerEvent name="updateQuote" type="zqu:quoteUpdate"/>
let quote = component.get("v.quoteState.quote");
let updateQuote = cmp.getEvent("updateQuote");
updateQuote.setParams({ quote: quote });
updateQuote.fire();
LWC example:
const updateQuote = new CustomEvent('updatequote', {
detail: { quote: this.quoteState.quote },
});
this.dispatchEvent(updateQuote);
Events should be dispatched with the listed parameters to persist any data changes within the Quote Studio page. For more information, see Headless and sidebar component - events.