Skip to main content

Notifications

Announcements

No record found.

Customer Service forum
Suggested answer

Is there a way to lock/disable the timeline on a case when it's resolved?

Posted on by 2,075
So my question is whether I can disable or prevent someone from adding activities or notes on a timeline when a case is resolved. I saw you can use javascript to disable controls and it seems like setDisabled works for timelines.
 
 
 
I tried adding it to my script and set it on form load:
 
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    }};
 
It doesn't seem to work. Would I have to create plugin to perform this task?
 
Kind regards,
Mike
 
  • Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    Is there a way to lock/disable the timeline on a case when it's resolved?
    Hi Partner,
    Has the issue been resolved?
    Have there been any updates? Please feel free to ask me any questions you may have!
    If it has been resolved, can you mark the response as an answer?
  • Suggested answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    Is there a way to lock/disable the timeline on a case when it's resolved?
    Hi Partner,
    When you resolve the case, the case form will be read-only and all controls(included Timeline) on the form will be disables.
    However, we can continue to add activities and notes even if the timeline is disabled, which seems to be by design!
    So we need some other way to stop users from creating activities and notes on resolved cases, the disable timeline approach doesn't work.
    Through workflow? Maybe give it a try.
    --Condition: check regarding case status:
    --Stop workflow: Canceled:
     
    Save and Active.
    Test:

    I hope you can verify my answer if it helps you! If you have any questions, please feel free to contact me.
    Regards,
    Leah

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,246 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,041 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans