Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Error attaching file to custom record w/.Net
We are currently trying to attach a file from the file cabinet to a custom record using the SuiteTalk web service when a specific action occurs in a product we have developed.
I can't find a lot of documentation on how to do this, but I think what I have below should work, however, when calling the "attach" method, an "unexpected error" is returned.
Here is the code snippet:
CustomRecordRef crImplementation = new CustomRecordRef();
crImplementation.typeId = "28";
crImplementation.internalId = implementationId;
crImplementation.name = "customrecord28";
RecordRef fileRef = new RecordRef();
fileRef.internalId = "10828";
fileRef.type = RecordType.file;
fileRef.typeSpecified = true;
AttachBasicReference attReference = new AttachBasicReference();
attReference.attachedRecord = fileRef;