Adding a file as an attachment to a message
I am trying to associate a File Cabinet document to a message (email). This is the request I am making:
<soapenv:Body>
<attach xsi:type=’platformMsgs:AttachRequest’>
<attachReference xsi:type=’platformCore:AttachBasicReference’>
<attachTo xsi:type=’platformCore:RecordRef’ internalId=’${message_id}’ type=’message’></attachTo>
<attachedRecord xsi:type=’platformCore:RecordRef’ externalId=’${file_externallId}’ type=’file’></attachedRecord>
</attachReference>
</attach>
</soapenv:Body>
I’m getting this error in response: ‘Missing or Invalid RecordType for AttachTo’.
<soapenv:Body><attachResponse xmlns=“”><platformMsgs:writeResponse xmlns:platformMsgs=“urn:messages_2023_2.platform.webservices.netsuite.com”><platformCore:status isSuccess=“false” xmlns:platformCore=”urn:core_2023_2.platform.webservices.netsuite. com“><platformCore:statusDetail type=”ERROR”><platformCore:code>USER_ERROR</platformCore:code><platformCore:message>Missing or Invalid RecordType for AttachTo</platformCore:message></platformCore:statusDetail></platformCore:status></platformMsgs:writeResponse></attachResponse></soapenv:Body>.
Note: consider that the tokens are correctly parameterized.



