function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Michael.WatkinsMichael.Watkins 

boolean values not saving when creating a case via api

when creating a case through the api in the below sample code, the case is created without error and all specified fields populate except Reproduced__c, which is a custom field of boolean type. when debugging, m_Reproduced is boolean and contains valid data. and i have tried values of both True and 1. yet neither value seems to have an effect- the field simply will not set via api, but i can set it through the salesforce web interface if i edit the case.

i also tried to manually set other, non-custom fields like IsClosed on create and those values did not take either.

any insight is greatly appreciated.


                Dim oCase As New sforce.Case()
                With oCase
                    .ContactId = m_ContactID
                    .Type = m_CaseType
                    .CreatedDate = Date.Now
                    .Description = m_CaseDescription
                    .Product__c = m_Product
                    .Steps_to_Reproduce__c = m_StepsToReproduce
                    .STT_Version_Number__c = m_VersionNumber
                    .Subject = m_Subject
                    .Component__c = m_Component
                    .Reproduced__c = m_Reproduced
                End With

                Dim oSaveResult() As sforce.SaveResult
                oSaveResult = oProxy.create(New sObject() {oCase})
SuperfellSuperfell
I'm guessing you're using .NET, in which case see
http://community.salesforce.com/sforce/board/message?board.id=NET_development&message.id=815
canonwcanonw
Make sure to set Specified field to true.

Check this out.   http://community.salesforce.com/sforce/board/message?board.id=NET_development&thread.id=815


Michael.WatkinsMichael.Watkins
thanks canonw! that was it.