As an ugly, embarrassing and last-ditch-effort hack to be able to attach a message to a custom record from Web Services I devised the following plan:
[LIST=1]
[*]Create message and attachment in web services (easy)
[*]Insert special text into the body of message (to be parsed by a SSS) (EG: ##ATTACHTORECORD_<recordTypeID>_<recordID>##)
[*]SSS UE parses record type ID and record id from message
[*]SSS UE sets message's 'record' and 'recordtype' fields (listed in the docs as supported!)
[*]SSS UE scrub the BS "special text" from the message and allow it to save
[/LIST]
Now, it's not pretty, but as far as I can tell (and have been told) I have no other options.
I got to work and after some promising experiments and some ODBC verification that indeed the record_id and record_type_id fields ARE used to attach a message to a record. Problem is, recordtype returns null... always.
To make things worse, setting either the record or recordtype fields causes the dreaded "UNEXPECTED ERROR".
Can someone from NetSuite please tell me what's going on? Is this an easy fix? If so can you pleeeease fix it, I've hit so many failures with NetSuite these last few weeks.. I just need something to work, even a god awful ugly hack like this.