I'm trying to write the value of a custom required attribute called Document Date which is in the standard date format (Month field, day field, year field). I tested this manually to see that the attribute is required.
I am trying to programatically add a document and populate this attribute. I can add documents without a problem, so it's just the attribute part that I need help with. The code snippet is below:
If (status = LL_OK) Then
status = LL_ValueAlloc(createInfo)
End If
If (status = LL_OK) Then
status = LL_ValueAlloc(lObjInfo)
End If
If (status = LL_OK) Then
status = LL_ValueAlloc(verInfo)
End If
If (status = LL_OK) Then
status = LL_ValueSetAssocInArgs(createInfo)
End If
If g_strDate = "" Then
g_strDate = CStr(month(Now) & "/" & day(Now) & "/" & _
year(Now))
End If
sYear = year(CDate(g_strDate))
sMonth = month(CDate(g_strDate))
sDay = day(CDate(g_strDate))
If (status = LL_OK) Then
status = LL_AssocSetAssoc(g_strDate, "Document Date"
End If
status = LL_CreateObjectEx(session, parentVol, lParentID, LL_VERSIONOBJECTTYPE, lType, sName, createInfo, lObjInfo)
I parse out the date into the day, month and year, but don't apply it since I didn't see a way to do this in the call.
Any help would be greatly appreciated. Thanks to all who have helped in the past too.
Peter Mello
I am trying to programatically add a document and populate this attribute. I can add documents without a problem, so it's just the attribute part that I need help with. The code snippet is below:
If (status = LL_OK) Then
status = LL_ValueAlloc(createInfo)
End If
If (status = LL_OK) Then
status = LL_ValueAlloc(lObjInfo)
End If
If (status = LL_OK) Then
status = LL_ValueAlloc(verInfo)
End If
If (status = LL_OK) Then
status = LL_ValueSetAssocInArgs(createInfo)
End If
If g_strDate = "" Then
g_strDate = CStr(month(Now) & "/" & day(Now) & "/" & _
year(Now))
End If
sYear = year(CDate(g_strDate))
sMonth = month(CDate(g_strDate))
sDay = day(CDate(g_strDate))
If (status = LL_OK) Then
status = LL_AssocSetAssoc(g_strDate, "Document Date"
End If
status = LL_CreateObjectEx(session, parentVol, lParentID, LL_VERSIONOBJECTTYPE, lType, sName, createInfo, lObjInfo)
I parse out the date into the day, month and year, but don't apply it since I didn't see a way to do this in the call.
Any help would be greatly appreciated. Thanks to all who have helped in the past too.
Peter Mello