Hi Guys, I try to attach a file via soap webservic...
# suitetalkapi
a
Hi Guys, I try to attach a file via soap webservice by phptoolkit. It's succeed to attach to employee record. But NetSuite response an error, Missing or Invalid RecordType for AttachTo, when I try to attach the file to ITEM record. Here is my PHP script. Am I missing something?
Copy code
$file = new RecordRef();
$file->internalId = "12987115";
$file->type = "file";

$attachBasicReference = new AttachBasicReference();
$attachBasicReference->attachTo = new RecordRef();
$attachBasicReference->attachTo->internalId = "151858";
$attachBasicReference->attachTo->type = RecordType::assemblyItem;
$attachBasicReference->attachedRecord = $file;

$request = new AttachRequest();
$request->attachReference = $attachBasicReference;

$attachResponse = $service->attach($request);

print_r($attachResponse);
b
a
Thanks, it seems that suitetlk doesn't support attach file to item record. :(
p
Is it even possible in the UI? That’s the first thing I’d look at when encountering something like this
a
In UI, I can attach files to item in its communication tab.