Discussions
create a phonecall with custom filed
I tried to create a phonecall with custom filed in java using netsuite web service 2013_2 version. But it’s throwing error while inserting record. what mistake I did. Below is my code
PhoneCall phoneCall = new PhoneCall();
List<CustomFieldRef> oCustomFieldRefList = new ArrayList<CustomFieldRef>();
StringCustomFieldRef strCF = new StringCustomFieldRef();
strCF.setScriptId("custeventcustomcallattempt");
strCF.setValue("234");
oCustomFieldRefList.add(strCF);
phoneCall.setCustomFieldList((CustomFieldRef[])
oCustomFieldRefList.toArray());
RecordRef[] recordRefList = new RecordRef[]{new RecordRef("1",recordID,"",RecordType.customer)};
phoneCall.setStatus(PhoneCallStatus._scheduled);
//phoneCall.setOwner(recordRefList[0]);
phoneCall.setMessage("Test-CustomFiledTest1");
phoneCall.setTitle("Test-CustomFiledTest1");
WriteResponse response = null;
response = _port.add(phoneCall);
System.out.println(response.getStatus()[0].getMessage());