Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Command Bar Menu - Appointment Activity -Disappearing CRM

$
0
0

I am facing an issue in CRM, the bug is when I create an appointment and try to save it, the commandBar go invisible after the load of the created record of the appointment. I try to inspect the javascript associated code but there is no hint about the source of the problem, I should say that after refreshing the page of the created page the command bar become visible.

OnSave: function (e) {

    EOZ.Appointment.SetPivotalId();

    var eventArgs = e.getEventArgs();

    if (Xrm.Page.ui.getFormType() == 1 && eventArgs.getSaveMode() == 1 && !saveAndClose) {
        Xrm.Page.getAttribute("createdon").addOnChange(EOZ.Appointment.CreatedOnChanged);
    }

    else {
        saveAndClose = true;
        Xrm.Page.getAttribute("createdon").removeOnChange(EOZ.Appointment.CreatedOnChanged);
    }
},

CreatedOnChanged : function () {
    var id = Xrm.Page.data.entity.getId();
    setTimeout(function () {
        Xrm.Utility.openEntityForm("appointment", id);
    }, 500);

}

NB : After a lot of javascript debugging, i noticed that the problem is only happened when the method "CreatedOnChanged" is called more than once, in the other hand if it's called just once the command bar is visible. I don't know if it's the source of the bug, but it is the only difference in the code's behaviour.


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images