Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Error adding a task to a purchase order
I'm trying to add a task to a PO transaction. Here's the .NET code:
Task t = new Task(); t.title = "The title"; t.message = "The message"; RecordRef rrPO= new RecordRef(); rrPO.internalId = "12345"; rrPO.type = RecordType.purchaseOrder; rrPO.typeSpecified = true; t.transaction = rrPO; RecordRef rrVendor = new RecordRef(); rrVendor.internalId = "67890"; rrVendor.type = RecordType.vendor; rrVendor.typeSpecified = true; t.company = rrVendor; WriteResponse TaskResponse = Service.add(t);
When I run the code, I get the error message:
Invalid company reference key 67890.
If I remove the code that sets the vendor (hoping that the vendor is auto assigned based on the PO), then I get the error message:
0