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.
export const contractsListDataLoad = async ({ api, response }) => {
// TODO: Add your code
return;
}
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 });
}
}
};