Discussions
Required field error when adding customer
I am adding a customer record using suitetalk. Normally we have the "leadsource" field set to be required. When the script adds the customer I set the leadsource field as follows:
RecordRef leadId = new RecordRef();
leadId.name = "CAM145 Web Site Leads";
leadId.type = RecordType.account;
leadId.internalId = "3787";
customer.leadSource = leadId;
WriteResponse response = nss.add(customer);
I get the error:
Please enter value(s) for: Lead Source
when I set the field to not be required the record adds properly, so I know the rest of my code is correct. Does anyone have any ideas?