QuickBooks Online SDK Preferences object returning wrong value for TimeTrackingFeatureEnabled?

26 Views Asked by At

All our QuickBooks Online Sandbox companies seem to be returning the wrong value for TimeTrackingFeatureEnabled property of the SDK Preferences object. We have since deployed to our customers in production and they are all reporting the same issue.

My understanding of the document here is that TimeTrackingFeatureEnabled property indicates whether or not the QBO company is linked to QuickBooks Time (formerly known as TSheets.) Is this incorrect? What am I missing?

'   MyQbo.QboDataService creates a DataService object using a properly configured and instantiated 
'   Intuit.Ipp.Core.ServiceContext object with the desired MinorVersion string.
Dim ds As Intuit.Ipp.DataService.DataService = MyQbo.QboDataService("29") 

'   Get the QBO company Preferences object.
Dim biz = ds.FindAll(New Preferences)
Dim pref = biz(0)

'   Read the TimeTrackingFeatureEnabled value.
Dim RealTimeTrackingActivatedSetting as Boolean
If pref.OtherPrefs IsNot Nothing AndAlso pref.OtherPrefs.Length > 0 Then
    Dim nv = pref.OtherPrefs.FirstOrDefault(Function(n) n.Name = "TimeTrackingFeatureEnabled")
    
    '   This is setting RealTimeTrackingActivatedSetting = True for everyone.
    If nv IsNot Nothing Then RealTimeTrackingActivatedSetting = nv.Value.ToBoolOrFalse
End If

'   ToBoolOrFalse is well-established as reliable, but here is the code for reference.
<Extension()>
Public Function ToBoolOrFalse(str As String) As Boolean
    If String.IsNullOrWhiteSpace(str) Then Return False
    Dim val As Boolean = False
    If Boolean.TryParse(str, val) Then Return val Else Return False
End Function
0

There are 0 best solutions below