Hi! Can someone help me with this? I am currently ...
# suitescript
c
Hi! Can someone help me with this? I am currently creating a item receipt that is referenced to a purchased order. But when i'm testing it, it says that "Adding new line to sublist item is not allowed." Do I have to enable a certain role for this?
b
share the code, but the error is fairly accurate
no adding new lines to item receipt
you can only modify the existing ones
c
public static WriteResponse CreateItemReceipt() { ItemReceipt itemReceipt = new ItemReceipt() { createdFrom = new RecordRef() { internalId = "2973", type = RecordType.purchaseOrder, typeSpecified = true }, tranDate = DateTime.Now, memo = string.Empty }; var itr = new ItemReceiptItemList(); itr.replaceAll = true; List<ItemReceiptItem> itrItem = new List<ItemReceiptItem>(); itrItem.Add(new ItemReceiptItem()); itrItem[0].orderLine = 1; itrItem[0].itemReceive = true; itrItem[0].quantity = 1; itrItem[0].item = new RecordRef(); itrItem[0].item.internalId = "116"; var itrDetails = new InventoryDetail(); var itrAssignList = new InventoryAssignmentList(); itrAssignList.replaceAll = true; List<InventoryAssignment> itrAssign = new List<InventoryAssignment>(); itrAssign.Add(new InventoryAssignment()); itrAssign[0].internalId = ""; itrAssign[0].receiptInventoryNumber = "AAA00000000000001"; itrAssign[0].quantity = 1; itrAssignList.inventoryAssignment = itrAssign.ToArray(); ; itrDetails.inventoryAssignmentList = itrAssignList; itrItem[0].inventoryDetail = itrDetails; itr.item = itrItem.ToArray(); itemReceipt.itemList = itr; itemReceipt.itemList.replaceAll = true; var b = Client.Service.add(itemReceipt); return b; }
b
wrong channel
c
There's a channel for soap?
b
this is for #C2K2RJNAC
c
Sorry. I'll jump to suitetalkapi channel