跳到主要内容

onBeforeWBSOperation

Description​

Fires before an operation that changes stored WBS codes

onBeforeWBSOperation: (plan: WBSOperationPlan) => boolean | void

Parameters​

  • plan - (required) WBSOperationPlan - the operation ID, reason, origin and proposed code changes

Example​

gantt.attachEvent("onBeforeWBSOperation", (plan) => {
return plan.codeChanges.length <= 100;
});

Details​

Return false to cancel the operation and its associated structural edit, if any. The event does not fire for a dry run or an operation with no code changes. Run any follow-up WBS or structural operation after the event handler completes.

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.