• Hello and welcome to our new forums. We upgraded our forum sites to a more robust and modern system which we hope you will enjoy. Be sure to check out your profile by clicking the button on the top right and configure your preferences, signature, time zone, avatar, etc. as you wish. If you need help with using this new forum'ware try the help link on the bottom right.

    Click here to review your account now.

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?
 

3keymedia

New member
Joined
May 13, 2019
Messages
4
Programming Experience
5-10
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:
Top Bottom