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)
Worksite SDK - Checkin Document
abRussB
I'm trying to figure out how to check in a document with the Worksite SDK. I am using the code below which was in the com ref manual, but I am getting an error when I click the button
Object reference not set to an instance of an object.
Line 96: objCheckinResult = objDoc.CheckInWithResults("filename", imCheckinDisposition.imCheckinNewVersion, imCheckinOptions.imDontKeepCheckedOut)
Private Sub btn_CheckIn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_CheckIn.Click
Dim objCheckinResult As IManCheckinresult
Dim objDoc As IManDocument
'Check in the document with checkin result
objCheckinResult = objDoc.CheckInWithResults(theFileName, imCheckinDisposition.imCheckinNewVersion, imCheckinOptions.imDontKeepCheckedOut)
'Get the profile errors from the checkin result
Dim profErrors As IManProfileErrors = objCheckinResult.ErrorList
'Get the error message
Dim message As String = objCheckinResult.ErrorMessage
End Sub
Also, why does it use filename to check in a doc? Wouldn't it be safer to use the docNum?
Find more posts tagged with
Comments
Migrateduser
The file name has to be the full path and file name of the file you want to check in. You must specify the physical file you want to provide for the check in operation. WorkSite doesn't keep track of where you checked the document out.
abRussB
This is what the file path is showing. I tried entering this as a string, but I get the same error.
DEFSERVER:\ADMIN_DOCS\BURNR\000505\20000104.1
abRussB
Actually, it turns out all I will need to do is unlock the file if it is checked out.
Anyone have an example for unlockdocument?