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.
Please note that on Saturday, April 11, 2026, at 8:00 PM Pacific time, our Case Management System will undergo a scheduled maintenance for approximately 30 minutes. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
PHP create new item set SiteCategory
Hi again,
Still working on creating new items in Netsuite via PHP and Web Services. I'm stuck on setting the site category. With the below code, the item will create fine (no errors or warnings returned) with the itemId I have assigned it, but nothing will be populated in the site categories. I'm also not sure "website" is the proper internal id, as I don't know where to find this list. TIA.
[PHP]$newItem = array (
"itemId" => $itemId,
"siteCategoryList" => array (
"website" => new nsRecordRef ( array ( "internalId" => "1" ) ),
"category" => new nsRecordRef ( array ( "internalId" => "78" ) ),
"isDefault" => true
)
);
$item = new nsComplexObject('InventoryItem');
Still working on creating new items in Netsuite via PHP and Web Services. I'm stuck on setting the site category. With the below code, the item will create fine (no errors or warnings returned) with the itemId I have assigned it, but nothing will be populated in the site categories. I'm also not sure "website" is the proper internal id, as I don't know where to find this list. TIA.
[PHP]$newItem = array (
"itemId" => $itemId,
"siteCategoryList" => array (
"website" => new nsRecordRef ( array ( "internalId" => "1" ) ),
"category" => new nsRecordRef ( array ( "internalId" => "78" ) ),
"isDefault" => true
)
);
$item = new nsComplexObject('InventoryItem');
0