manuscripts backend save/edit to temp database with a reference id saved if edit otherwise ref id is set to null