How can a copied note be identified via the API as a newly created note?

80 views Asked by At

For the purposes of syncing notes in OneNote with those previously downloaded to the browser's IndexedDb, we do a check (via the API) of each note's createdTime and lastModifiedTime against our own server-stored last_updated_time. This check works fine for added pages and modified pages, so that we can add new notes to the browser's IndexedDb and modify those already stored in it.

BUT when a page has been created in OneNote by a 'Move or Copy - Copy' operation, its createdTime property is that of the original note, so it can't be identified as a new note. (It does get its own lastModifiedTime and id properties, but that's just confusing because we'd expect to find in our browser's IndexedDb a previously downloaded note with that id that needs to be updated - and of course there's no such note!)

So, how can a copied note be identified via the API as a newly created note - short of getting OneNote itself modified to give that note its own createdTime ;) ?

1

There are 1 answers

1
Jorge Aguirre On BEST ANSWER

Why not say something like, if the id of the page isn't present in the indexed DB, then add it regardless of createdTime?