You are viewing limited content. For full access, please sign in.

Question

Question

LFFieldData.BadFieldValues not working with a date field

SDK
asked on October 1, 2014

When attempting to retrieve the value of the "BadFieldValues" property on the LFFieldData object in LFSO (8.2 and 9.1 were tested and able to reproduce the issue), if a date field is used and has a bad value, the BadFieldValues always returns an empty ILFCollection.  I was able to reproduce this using the sample provided in the LFSO documentation.  The code to reproduce the issue is below.  Will this be fixed in a future release of the Laserfiche SDK?

Dim Doc As LFDocument = DB.GetEntryByPath("\My Document")
Dim FD As LFFieldData = Doc.FieldData
FD.LockObject(Lock_Type.LOCK_TYPE_WRITE)
FD.Field("Number Field") = "abc"
FD.Field("Date") = "abc"
Try
    FD.Update()
Catch ex As Exception
    Dim BadFieldValues As ILFCollection = FD.BadFieldValues
    For Each BadField As LFErrorObject In BadFieldValues
        Console.WriteLine(BadField.ErrorCode)
        Console.WriteLine(BadField.ErrorString)
        Console.WriteLine(BadField.ObjectName) ' The invalid field
    Next
End Try

Thank you

0 0

Answer

APPROVED ANSWER
replied on October 1, 2014

Thanks for pointing this out, we will look into fixing it for a future release. BadFieldValues is populated by the server, but in this case it is LFSO itself that is rejecting the value because it can't be converted to a timestamp.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.