Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Suggested answer

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

(1) ShareShare
ReportReport
Posted on by 2,099
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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,642 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans