Dynamics CRM -'Mark Complete' button on Task is not working

2.1k views Asked by At

My problem is almost similar to this thread.

We are using CRM 2016 online.

The "mark complete" button on Task activity is not working intermittently. It is unclear as to which scenario is causing the issue, however, we do have a validation (due date against current date) that fires on 'Save' of the form and prevents Save if validation fails. So if the user clicks 'Mark Complete', it is internally firing Save event which is causing the validation to occur. When I fix the validation error,save changes, and click 'Mark Complete' the button doesn't respond. Having said that, I faced the same issue even though there was no validation (for example, no date field to validate). So I am unable to pin point the flow of events causing the issue.

Can anyone suggest how do I fix/debug this problem ?

Thanks Rajesh

1

There are 1 answers

2
Nikhil Patel On BEST ANSWER

The function that fires on Save event if the validation fails add the following code after executionObj.getEventArgs().preventDefault():

if (typeof (Mscrm) != "undefined" && typeof (Mscrm.CommandBarActions) != "undefined") {
    Mscrm.CommandBarActions.$P = false; //to enable Mark Complete to be clicked again
    return false;
}