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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
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