Hi, i have written the following event handler code to update a column in the document library, on checkin of a document:
Select Case listEvent.Type
Case SPListEventType.CheckIn
sLog = sLog + "Newest Item is Checked-out" + vbCrLf
Dim ApproveStatusBoolean As Boolean = True
For Each oField In oItem.Fields
If (oItem("ApproveStatus") = "Rejected") Then
ApproveStatusBoolean = False ' Old document for re-review
Exit For
End If
Next
If (ApproveStatusBoolean = False) Then
oItem("ApproveStatus") = "Submitted"
oItem.Update()
SmtpMail.Send(objMailMesg)
End If
End Select
I find that the ApproverStatus column is getting updated if i checkin the document from the document library but it is not happening if i checkin the document from inside the word document when it promts for "other users cannot see your changes untill you checkin. do u want to checkin?".
can you please help me to know what is going wrong how to get the column updated if i checkin from inside also.
or is there any way by which i can turn off that prompt itself.