I am trying to activate the History flag of a project in the customize section of QC11 with VBS. This is my script:
If Not voCustomization.IsLocked Then
' lock
voCustomization.LockObject
Print "[" & Sysdate() & "] Locked customization object."
If Err.Number = 0 Then
Set custFields = voCustomization.Fields
' Make field searchable
Set fcraField = custFields.Field("Test", "TS_USER_88")
If fcraField.IsSupportsHistory Then
If fcraField.IsHistory Then
Print "[" & Sysdate() & "] History already set on TS_USER_88 of " & vsDomain & "." & vsProject
Else
fcraField.IsHistory = True
Print "[" & Sysdate() & "] History enabled on TS_USER_88 of " & vsDomain & "." & vsProject
End If
End If
' check if the customization object has changed and commit if neccessary
If voCustomization.IsChanged Then
Print "[" & Sysdate() & "] Uncommited changes are waiting."
voCustomization.Commit
Print "[" & Sysdate() & "] Successfully commited change"
Else
Print "[" & Sysdate() & "] No uncommited changes are pending."
End If
Else
Print "[" & Sysdate() & "] Could not lock project " & vsDomain & "." & vsProject & ", abording now..."
End If 'voTDC.Customization.LockObject
' unlock
voCustomization.UnLockObject
Print "[" & Sysdate() & "] Unlocked customization object."
When I check the output of the script I can see that it successfully connected to the project and says "History already set on ...". When I go into the customization section > Project Entities > Test > User Fields > TS_USER_88
then the "History" checkbox is not checked. What am I doing wrong?