Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
SetAttributeByID: No errors, but not working?
abRussB
I am attempting to reset the Custom22 and Custom26 fields in order to reset a doc
marked for deletion. Anyone know why the code below has no errors, but doesn't reset these fields?
' get document in the database
Dim doc As IManDocument = db.GetDocument(docNum, docVersion)
doc.SetAttributeByID(imProfileAttributeID.imProfileCustom22, "")
doc.SetAttributeByID(imProfileAttributeID.imProfileCustom26, False)
Find more posts tagged with
Comments
abRussB
I forgot to add doc.Update(). I think that was one of the problems, but of course adding this creates an error.
[Content ][Update ]Document is in use
System.Runtime.InteropServices.COMException: [Content ][Update ]Document is in use
Anyone know how to resolve this?
abRussB
Needed unlockcontent. Working now.
doc.SetAttributeByID(imProfileAttributeID.imProfileCustom22, "")
doc.SetAttributeByID(imProfileAttributeID.imProfileCustom26, False)
doc.UnlockContent
doc.Update()
abRussB
This is now resetting those fields and unmarking a file for deletion, however
when you mark a document for deletion it changes the document name to
"Marked for Deletion - filename"
How do I remove "Marked for Deletion - " from the Document Name using Worksite API?
jny
Is "Marked for Deletion - " in the document name or description field? If it's either, have you tried using the SetAttributeByID method to rename it? If it's neither, which field are you referring to?