quotesDetailNew: "quotesDetailNew" = 'quotesDetailNew'

Method name for PRE quotesDetailNewPre and POST quotesDetailNew

This event initiates when the New Quote button is pressed at /#/qc/quotes. The method is activated following the recalculation and backend saving of a new quote, redirecting the user to the quote detail page at /#/qc/quotes/<quoteId>.

Example: (Basic)

export const quotesDetailNew = async ({ api, quoteAPI }) => {
// TODO: Add your code
return;
}

Example: (Basic create new, with edited label)

export const quotesDetailNew = async ({ quoteAPI }) => {
await quoteAPI.setHeaderValue('label', 'Interceptor experiment - rename quote');
};

Example: (Salesforce: Prefill customer from account page)

export const quotesDetailNew = async ({ quoteAPI, api }) => {
const { crmManager, fetch } = api;
const payload = await crmManager.getPayload();

if (await crmManager.isAccountPage()) {
const customerId = payload[await crmManager.getAccountAssociationField()];
await quoteAPI.setHeaderInputValue('Customer', customerId);
};

Generated using TypeDoc