var Namespace = Namespace || {};// Lock timeline functionNamespace.lockTimeline = function (executionContext){ var formContext = executionContext.getFormContext(); var formStatus = formContext.ui.getFormType(); if (formStatus === 4 || formStatus === 3) { var timeline = formContext.getControl(/Timeline/); // disable timeline timeline.setDisabled(true); // Check timeline is disabled var timelineDisabled = timeline.getDisabled(); console.log(timelineDisabled); // This returns true but I can still edit and add things to the timeline }};