contractsListDataLoad: "contractsListDataLoad" = 'contractsListDataLoad'

Method name for PRE contractsListDataLoadPre and POST contractsListDataLoad

This method will trigger in CRM, when contract List is loaded.

Additional Properties:

  • response: Returns list of the contract.

Example: (Basic)

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

Example: (Navigate User to Existing Contract or Create a New One)

export const contractsListDataLoad = async ({
api: { navigate, crmManager },
response: { totalRows, data },
}) => {
const isOpportunityPage = await crmManager.isOpportunityPage();
if (isOpportunityPage) {
if (totalRows === 0) {
await navigate("newContractPage");
} else if (totalRows > 0) {
const id = data[0]?.typedId;
await navigate("contractsPage", { id });
}
}
};

Generated using TypeDoc