Const
export const quotesDetailNewCheck = async ({ api }) => {
// TODO: Add your code
return;
}
export const quotesDetailNewCheck = async ({ api: { notify } }) => {
await notify.error('quotesDetailNewCheck returned false, you can not create a quote', { duration: 10 });
// When this method returns false the user is prevented from creating a new offer
return false;
};
export const quotesDetailNewCheck = async ({ api: { crmManager, notify } }) => {
const payload = await crmManager.getPayload();
if (await crmManager.isAccountPage()) {
await notify.error('Quoting from an account page it is not possible');
return false;
}
};
Generated using TypeDoc
Method name for PRE
quotesDetailNewCheckPre
and POSTquotesDetailNewCheck
This method is triggered after pressing the New Quote button at
/#/qc/quotes
, but before the quote is created. If this method returnfalse
a quote will not be created and user will stay at quotes list. In this method you don't have access toquoteAPI
, but you can use other api for checking conditions from CRMs.