Very strange 'save' issue with NAB groups

This has got us puzzled. We’ve got an agent that does a bunch of stuff, including updating group memberships in the NAB. Everything works fine except it refuses to save the group document. It’s a complex agent, but in trying to debug the issue, I stripped it down to the bare minimum, and even this doesn’t work (run from a view):

Set groupdoc = db.GetDocumentByUNID(mydocid)

If groupdoc.Save(True, False) Then

Messagebox("Saved!")

Else

Messagebox("Not Saved!")

End If

It finds the groupdoc object fine, and I can see all its properties. I can save that same document in my client with no problem. I have manager rights to the database and am listed as owner and administrator of the group. The problem affects all ‘group’ documents, but is not an issue with the person and temporary docs that the full agent uses. Document locking isn’t enabled.

Any suggestions?

Thanks,

Karl

Subject: SOLVED

Turns out ‘Doc.save’ returns false if nothing has changed on the doc, as per my simple example. It was failing on the full agent because I was using the wrong document reference when I updated the field, so nothing appeared to have changed on the group document.

Karl