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.
Update: Narrative Insights has been restored and is now available.
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.
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.
Update Custom Field for sales order
I can't seem to update a custom field for a specific sales order using the PHP api.
I'm getting a response of: INVALID_KEY_OR_REF, The specified key is invalid.
2074 is the order # I'm trying to edit and 229 is the internal id of the custom transaction body field I made. Any ideas?
[CODE]<?php
require_once '../PHPToolkit/NetSuiteService.php';
$service = new NetSuiteService();
$so = new SalesOrder();
$so->internalid = 2074;
$so->entity = new RecordRef();
$customFieldList = new CustomFieldList();
$customField = new StringCustomFieldRef();
$customField->value = utf8_encode("12345");
$customField->internalId = '229';
$customFieldList->customField[] = $customField;
$so->customFieldList = $customFieldList;
I'm getting a response of: INVALID_KEY_OR_REF, The specified key is invalid.
2074 is the order # I'm trying to edit and 229 is the internal id of the custom transaction body field I made. Any ideas?
[CODE]<?php
require_once '../PHPToolkit/NetSuiteService.php';
$service = new NetSuiteService();
$so = new SalesOrder();
$so->internalid = 2074;
$so->entity = new RecordRef();
$customFieldList = new CustomFieldList();
$customField = new StringCustomFieldRef();
$customField->value = utf8_encode("12345");
$customField->internalId = '229';
$customFieldList->customField[] = $customField;
$so->customFieldList = $customFieldList;
0