Hi All,
I am trying to add a contact record using web service and am having a couple of problems.
The actual record is being created but the value for _contact.phone and _contact.mobilePhone are not coming out properly in the contact record. For example, both these fields are being populated with "NSWS.RecordRef" (NSWS is the the name of the web service).
My code is below - does anyone know why the value is being written to the contact record?
Also, when I include _contact.email I get the following error message:
You have entered an Invalid Field Value NSWS.RecordRef for the following field: email
Am I referencing these objects correctly?
Contact _contact = new Contact(); RecordRef company = new RecordRef(); company.internalId = companyID; //nsClientID; RecordRef customForm = new RecordRef(); customForm.internalId = "-40"; RecordRef contact = new RecordRef(); contact.internalId = contactID; RecordRef contactemail = new RecordRef(); contactemail.internalId = Email; RecordRef contactPhone = new RecordRef(); contactPhone.internalId = TelNo; // TelNo; RecordRef contactMobile = new RecordRef(); contactMobile.internalId = Mobile; // TelNo; StringCustomFieldRef clientIDinternal = new StringCustomFieldRef(); clientIDinternal.internalId = "custentity_client_contact_nsinternalid"; clientIDinternal.value = companyID; // Add the custom field ref object to the cfr array CustomFieldRef[] cfr = new CustomFieldRef[1]; // increase if more parameters cfr[0] = clientIDinternal; // Set standard fields _contact.company = company; //_contact.email = Convert.ToString(contactemail); You have entered an Invalid Field Value NSWS.RecordRef for the following field: email _contact.phone = Convert.ToString(contactPhone); _contact.mobilePhone = Convert.ToString(contactMobile); _contact.customForm = customForm; _contact.customFieldList = cfr; _contact.entityId = Name;
Thanks in advance