İş Kaydı BeforeSave Script
İş Kaydı
let locationControl = this.recordService.formGroup.controls.LOCATIONID.value;
let resControl = this.recordService.formGroup.controls.RESID.value;
let taskControl = this.recordService.formGroup.controls.TASKID.value;
let dueDateControl = this.recordService.formGroup.controls.DUEDATE.value;
let reportDateControl = this.recordService.formGroup.controls.REPORTDATE.value;
if(!taskControl){
let msg3 = `You should select a job.`;
msg3 = angus.languageService.staticTranslator.translate(msg3);
throw msg3;
}
else if(!locationControl && !resControl){
let msg3 = `You should choose a location or reservation.`;
msg3 = angus.languageService.staticTranslator.translate(msg3);
throw msg3;
}
if(this.recordService.component.mode.value == 'insert'){
if(dueDateControl != reportDateControl){
this.recordService.formGroup.controls.STATUSID.setValue(6);
}
}
if(this.opener && typeof this.opener.loadData === 'function') {
this.opener.loadData({cache:false,dataSets:['DS1']})
}
Last updated