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
rovaartrovaart 

INVALID_FIELD: Field name provided, LNG_ID__c is not readable for Account

Hello, when I call the Upsert method I get the following error: INVALID_FIELD: Field name provided, LNG_ID__c is not readable for Account The Field LNG_ID__c is a custom numeric field which is set as an external ID field. I found on this board when I want to use numeric fields I als should set the specified value as true, but that didn't solve the problem. The following VB.NET code I use: Dim myConnection As SqlConnection Dim myCommand As SqlCommand Dim dr As SqlDataReader Dim strName As String Dim SFDCClient As New SFDCClient myConnection = New SqlConnection() myConnection.ConnectionString = GetConString() myConnection.Open() myCommand = New SqlCommand("Select * from relations", myConnection) dr = myCommand.ExecuteReader() Dim accounts As sforce.Account() = New sforce.Account(0) {} dr.Read() accounts(0) = New sforce.Account accounts(0).Name = dr("strcompany").ToString.Trim accounts(0).LNG_ID__c = CDbl(dr("lngID")) accounts(0).LNG_ID__cSpecified = True SFDCClient.Login() Dim result() As sforce.UpsertResult result = SFDCClient.sForceService.upsert("LNG_ID__c", accounts) Could it be a problem that mine field in Salesforce is double and the field in our database is an integer? So when I convert it to double it is like 1.0? Hope someone can help.
martinnmartinn
This is just a wild guess, but could it be because it's defined as an external ID?  Updating a custom numeric field shouldn't be an issue, and I don't think the int-double datatype would cause the error you got.