2024 Oct 31 2:47 PM - edited 2024 Oct 31 3:31 PM
With SAP CAP, is it possible to register an event handler for Draft Lock timeout?
Our requirement is that when a draft lock expires, we want to automatically move the draft data to persistent storage (auto-save) and notify user that the draft data is saved automatically and lock is released.
Thank you
Request clarification before answering.
Hi @huijiezhang ,
By checking all events in debug, it seems that there is no built-in event for draft lock expiration.
Also, no notification has been sent to the UI after the lock expires.
The framework checks for existing lock when a user tries to edit a record.
Mimicking that, I can imagine a polling mechanism set up to run at regular interval to check lock expiry by comparing DRAFT_DraftAdministrativeData.LastChangeDateTime + cds.fiori.draft_lock_timeout to now.
If you mean to send back notification to the UI from the server tied to the session where the user is editing the draft, that could be tricky. Currently I have no idea if the framework provides a utility to do that.
Regards,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
30 | |
8 | |
7 | |
6 | |
6 | |
6 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.