Capture "submit" for record creation, "update" for when the record is modified, and "publish" and "un-publish" and track the timestamp and user for the modification.
Psudocode
def logdocumentchange(username,action)
if newdoc['status'] != olddoc['status']:
if newdoc["status"]==0:
logdocumentchange("hbarrett","un-publish")
else:
logdocumentchange("hbarrett","publish")
Capture "submit" for record creation, "update" for when the record is modified, and "publish" and "un-publish" and track the timestamp and user for the modification.
Psudocode def logdocumentchange(username,action) if newdoc['status'] != olddoc['status']: if newdoc["status"]==0: logdocumentchange("hbarrett","un-publish") else: logdocumentchange("hbarrett","publish")