I've created a number of custom fields that are attached to Contacts. I'm tyring to figure out how to update one of those custom fields via web services, but I'm getting "An unexpected error has occured" message (which naturally isn't very helpful <g>)
Here's my code (C#, not php - but php is colorful):
public static bool updateContactField(string fieldName, string fieldValue, string contactID, out string statusDetail) { StringBuilder sb = new StringBuilder(); DateCustomFieldRef dateCF = new DateCustomFieldRef(); dateCF.internalId = fieldName; dateCF.value = DateTime.Parse(fieldValue); CustomFieldRef[] custFieldRefs = new CustomFieldRef[1]; custFieldRefs[0] = dateCF; Contact contact = new Contact(); contact.customFieldList = custFieldRefs; contact.internalId = contactID; WriteResponse wr = misc._service.update(contact); if (!wr.status.isSuccess) { foreach (StatusDetail sd in wr.status.statusDetail) { sb.Append(sd.code + "#" + sd.message + "#" + sd.type); } } statusDetail = sb.ToString(); return wr.status.isSuccess; }I call the method above with this code in my .aspx document:if (NetSuite.misc.Login()) { string fieldName = "custentitymember_date_last_logged_in"; string fieldValue = System.DateTime.Now.ToString(); string contactID = "44"; string statusDetail = ""; bool methodStatus = NetSuite.dataWrite.updateContactField(fieldName, fieldValue, contactID, out statusDetail); Response.Write(statusDetail); }I'm guessing there's something seriously wrong with the code above, but I'm having trouble finding examples to compare against.Can anyone point out the faulty part?ThanksKevin