Hello,
I am facing issue with creating child matrix item using soap web services. Can you please guide me?
Here is the sample code that we are using to create child matrix item.
InventoryItem createInventoryItem = new InventoryItem();
//createInventoryItem.matrixType = ItemMatrixType._parent;
createInventoryItem.matrixType = ItemMatrixType._child;
createInventoryItem.matrixTypeSpecified = true;
createInventoryItem.itemId = “TEST-CHILD-MATRIX”;
createInventoryItem.upcCode = “66666666";
createInventoryItem.displayName = “Test Child Matrix Item”;
createInventoryItem.vendorName = “Test child Matrix Vendor”;
createInventoryItem.externalId = “666666”;
// creating Cogs Account
RecordRef cogsAccount = new RecordRef();
cogsAccount.internalId = “155";
cogsAccount.type = RecordType.account;
cogsAccount.typeSpecified = true;
createInventoryItem.cogsAccount = cogsAccount;
// Creating Asset Account
RecordRef assetAccount = new RecordRef();
assetAccount.internalId = “140”;
assetAccount.type = RecordType.account;
assetAccount.typeSpecified = true;
createInventoryItem.assetAccount = assetAccount;
////tax Schedule
RecordRef taxschedule = new RecordRef();
taxschedule.internalId = “1";
taxschedule.type = RecordType.taxType;
taxschedule.typeSpecified = true;
createInventoryItem.taxSchedule = taxschedule;
RecordRef subItems = new RecordRef();
subItems.internalId = “5099”;
subItems.externalId = “888888";
subItems.type = RecordType.inventoryItem;
subItems.typeSpecified = true;
createInventoryItem.parent = subItems;
WriteResponse res = NSService.upsert(createInventoryItem);