+ Start a Discussion
sabelstromsabelstrom 

IsClosed issue on Cases via Sforce API

Hi,
has anyone else experienced issues with values provided via the sforce api when requesting the IsClosed field on the Case object? All values come thru as "False", even when confirming thru DataLoader that there are True values. Am using VS, coding in VB.NET. Filtering on client to show all, closed and open, but have done workaround w/ indexOf() of Status value to determine closed -- this is not my preference as it doesn't provide for good reuse for customers with different Status naming. Any thoughts?

Cheers,
Jan
DevAngelDevAngel
Hi sabelstrom,

Nope haven't heard of this before. Which wsdl is your code based on? Would you mind posting a snippet?
sabelstromsabelstrom
Dave,
thanks for your response. i am using the Enterprise wsdl. Here is the snippet:

Begin Code ====================================
qr = myBinding.query(strQueryString)
While bContinue
For i = 0 To qr.records.GetUpperBound(0)
Dim thisCase As sforcekp.Case = CType(qr.records(i), sforcekp.Case)
Dim dsNewRow As DataRow
dsNewRow = ds.Tables("Cases").NewRow()
dsNewRow.Item("Id") = thisCase.Id
dsNewRow.Item("CaseNumber") = thisCase.CaseNumber
dsNewRow.Item("Subject") = thisCase.Subject
dsNewRow.Item("OwnerId") = thisCase.OwnerId
dsNewRow.Item("Status") = thisCase.Status
dsNewRow.Item("IsClosed") = thisCase.IsClosed
dsNewRow.Item("CreatedDate") = thisCase.CreatedDate
dsNewRow.Item("NormalizedDateTime") = thisCase.CreatedDate.ToUniversalTime.ToString("s", System.Globalization.DateTimeFormatInfo.InvariantInfo)
ds.Tables("Cases").Rows.Add(dsNewRow)
Next
If qr.done Then
bContinue = False
Else
qr = myBinding.queryMore(qr.queryLocator)
End If
End While
End Code ====================================

...where sforcekp is the name of the web ref to the wsdl. the column for the "IsClosed" item is set to type boolean, but i can see thru VS's QuickWatch that the value isn't even coming thru from SFDC correctly - all are coming thru as false.

Any assistance is greatly appreciated - and please let me know if you need add'l info.

cheers,
Jan
SuperfellSuperfell
and isClosed is in the list of fields for the query?
sabelstromsabelstrom
Simon,
thanks for getting me to recheck. the querystring was being built on the fly in javascript then passed via ajax.net to method - turns out a formatting error on string caused IsClosed to get garbled. All fixed now.

thanks again!

cheers,
Jan