How can I insert Sales Order Item with PC unit at Netsuite Using Phptoolkit?

324 Views Asked by At

I've been trying to insert Sales Order Item With Same product but with different UOM, PC and Case. The problem is, It only accept Case Unit.

here's the image. netsuite item with units

In Phptoolkit to define what's the item unit to be set, would be like this.

$soi = new SalesOrderItem();
$soi->item->internalId = $internal_id;
$soi->quantity = $q;
$soi->units = new RecordRef();
$soi->units->internalId = $unit_internal_id;
$soi->rate = $rate;

Example The units Type 'CSx6' internal id is 5 if i set the internal id 5 for the unit internal id. then it will accept it and show CSx6 at netsuite. but the problem is when I try to transfer the item with the BASE UNIT as PC . I just hardcoded the internal ID as 1 because it is a PC. and I get an error of INVALID_KEY_OR_REF.

So how can I insert the SalesOrderItem with the base unit?

UPDATE: I just need to set the internal Id of that unit. the problem is I can't use the Base unit, I want to use PC, But phptoolkit just give me the internal id of unit Type, stock unit, purchase unit, and sales unit. but the base unit is missing

0

There are 0 best solutions below