PM_CONTRACTS_DETAIL_OPEN: "contractsDetailOpen" = 'contractsDetailOpen'

Method name for PRE contractsDetailOpenPre and POST contractsDetailOpen

Triggered when a user opens contract detail

Example

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

Example

Recalculate only with status DRAFT, DENIED and WITHDRAWN

export const contractsDetailOpenPre = async ({ contractAPI }) => {
const contractsWFStatus = await contractAPI.getHeaderValue('workflowStatus');
if (['DRAFT', 'DENIED', 'WITHDRAWN'].includes(contractsWFStatus)) {
await contractAPI.recalculate();
}
};

Generated using TypeDoc