Skip to content

Stop

Stops a milestone and marks it as completed.

1
myMilestones.Stop(name: string):Milestone

Parameters

string name
    The name of the milestone. Required.

Returns

The Milestone instance if found; otherwise, null.

Remarks

Once a milestone has been stopped, it cannot be started again. If needed, use Milestones.Add to create a new milestone.

If multiple milestones share the same name, only the milestone that is currently in progress will be stopped and returned.

Examples

Complete a milestone and record the elapsed time

1
2
3
4
5
var response = $Case.Milestones.Stop('First Response');

if (response) {
    $Case.Profile.SetValue('ResponseHours', response.Elapsed);
}

See Also