I'm working on something like that to do the job.
It's working except that you can't assigned the call or meeting to another user and still stay an invitee.
I would like to add this code at load of the edit view.
This code is currently in the custom/calls/tpl/footer.tpl.
PHP Code:
function fill_invitees() {
if (typeof(GLOBAL_REGISTRY) != 'undefined') {
//If new call (the subject record will tell if new call )
if (!document.EditView.elements["record"].value){
//New call
if (document.EditView.elements["assigned_user_id"].value != GLOBAL_REGISTRY.current_user.fields.id){
//Ok the assigned user is not the current user
//Delete the current user
SugarWidgetScheduleRow.deleteRow(GLOBAL_REGISTRY.current_user.fields.id);
}
}
else{
//Existing call
}
SugarWidgetScheduler.fill_invitees(document.EditView);
}
}
Edit : And this is not working for a quickcreate...
Bookmarks