Unable to update date & integer data types on salesforce record

3keymedia

New member
Joined
May 13, 2019
Messages
4
Programming Experience
5-10
Using a WSDL and C# I have successfully connected to my salesforce org and can update records, particularly any data type that is "standard" or a "text" string... but when I attempt to update "date" or "integer" the values remain "null"

We have tried various date formats and can not seem to figure out why the values will not successfully update for "date" and "integer" data types.

We have even tried hard coding the values in rather than parsing and still get the same result.

What could I be missing?
 
Anyone out there able to help? We have successfully passed data in via workbench, but still can not figure out why this "date" field will not pass when updating record. All other fields will update but this one, even when we attempt to hard code with correct string format. Here is a snippet of the code -

C#:
Dim c As Contact = outResult.records(0)
Dim contact As Contact = New Contact() With {
    .Id = c.Id,
    .FirstName = "C4 " & rgx.Replace(dr("FirstName").Replace(",", " "), " ").Trim,
    .LastName = rgx.Replace(dr("LastName").Replace(",", " "), " ").Trim,
    .REC_NO__c = dr("Recomendation").Replace(",", " ").ToString.Trim,
    .REC_EXP_DATE__c = "1/1/2019",
    .ID__c = "1234567"
    }

queryClient.update(header, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, New sObject() {contact}, outInfo, saveResult)
[Image: Gary Strahle]Gary Strahle · May 14
 
Last edited by a moderator:
Back
Top Bottom