Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
149337 | Nov 22,2019 04:10 AM UTC | Nov 29,2019 05:10 AM UTC | Angular - EJ 2 | 6 |
![]() |
Tags: Schedule |
public onActionBegin(args: ActionEventArgs): void {
//Store recurrence in the DB and get the primary key id from DB
this.someService.createRecurrence(this.someModel).then( (response)=>{
let data:Object=new DataManager(this.scheduleObj.getCurrentViewEvents()).executeLocal(new Query().where('RecurrenceID', 'equal', args.addedRecords[0]['Id'])); //Find recurrence which was just created
data[0].Id = response['id']; // Re-assign the ID obtained from the DB to the recurrence that just got created
this.scheduleObj.saveEvent(data[0], 'EditOccurrence'); //Save changes
console.log('before then:' + JSON.stringify(this.scheduleObj.getEvents())) //Id doesn't change even after updating
});
}
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.