You need to sign in to do that
Don't have an account?
JohnW
Unable to update text box
Code:
I've created a custom field of type text. but i am unable to update this via the api. The code above is a sample of what i am trying to do:-
string strQueryData = "select Id,Field1__c, Field2__c from CustomObj__c Where Contact__c = '0033000000GsPwn'"; arQueryResult = o2.query(strQueryData); if (arQueryResult.records == null) { strErrorMsg = "No records matched query parameters"; } else { arQueryResult.records[p].Any[1].InnerText = "true"; arQueryResult.records[p].Any[2].InnerText = "'18 09 2006'";
I've created a custom field of type text. but i am unable to update this via the api. The code above is a sample of what i am trying to do:-
(Field1 = Checkbox
Field2 = Text)
The Update works ok and reports no errors but if i query the object straight after the second field is not set where as the first one is set correctly, this is also mirrored by the salesforce frontend
Any help would be most appreciated,is there a special way of updating move than one field or is it that the field is not updateable?
Cheers, I've figured out that if the text box is already populated then the update will work, but if the text box is empty them it won't work.
Any ideas as to a way around this?
Cheers Simon thats works
Private Sub ClearField(ByVal fieldName As String, ByVal fields() As System.Xml.XmlElement)
If Not fields Is Nothing Then
For i As Integer = 0 To fields.GetUpperBound(0)
If fields(i).LocalName.ToLower().Equals(fieldName.ToLower()) Then
fields(i).InnerText = "true"
fields(i).Attributes.RemoveAll()
End If
Next
End If
End Sub