When we are trying insert a custom field data in the Sales order we are getting INVALID CUSTOM FIELD REF. Following is the code we are trying.
SelectCustomFieldRef listCF = new SelectCustomFieldRef();
listCF.internalId = "33";
ListOrRecordRef listRef = new ListOrRecordRef();
listRef.internalId = "2008";
listCF.value=listRef;
CustomFieldRef[] cfRefs = null;
cfRefs = new CustomFieldRef[1];
cfRefs[0] = listCF;
salesorder.customFieldList=cfRefs;
Created a support ticket # 468700 one month back. But yet to get reply.