I've created a custom Transaction Body Field named "Created From" of type List/Record - Transaction
That I want to be have like the native NetSuite Created From fields. I have added this custom field to the Customer Refund form and when entering (or editing) the refund if I give a value of "Sales Order #1234
" it saves correctly and becomes a link to the sales order. But when I try to set it using code
customerRefund.setFieldValue("custbody_ifx_created_from", "Sales Order #" + salesOrderId);
id = nlapiSubmitRecord(customerRefund);
This error is generated
Error: INVALID_KEY_OR_REF Invalid custbody_ifx_created_from reference key Sales Order #81388396.
How can I create a valid key or reference to another record?