Discussions
Searching Supply Chain Snapshot Simulation Records
Hi,
I am trying to write a script to access and filter Supply Chain Snapshot Simulation Records. The netsuite help page says that they are avaiable to Create, Delete, Update and search using SuiteScript. The top of the page says in Suitescript 2.x, but I have only been able to create and delete using Suitescript 1.x.
https://suiteanswers.custhelp.com/app/answers/detail/a_id/90749
Is there something that I am missing as the search function does not work and returns a message saying invalid record type. I was assuming I could use nlapiSearchRecord.
function createSimulation(location, item, quantity, date) { var simulationRecord = nlapiCreateRecord('supplychainsnapshotsimulation', { recordmode: 'dynamic' }); simulationRecord.setFieldValue('memo', 'Simulation for item id=' + item); simulationRecord.setFieldValue('transactiontype', 'PurchOrd'); simulationRecord.setFieldValue('quantity', quantity); simulationRecord.setFieldValue('status', '5'); simulationRecord.setFieldValue('itemnamenumber', item); simulationRecord.setFieldValue('supplylocationdate', date); simulationRecord.setFieldValue('supplylocationsubsidiary', 1); simulationRecord.setFieldValue('supplylocation', location); var simulationKey = nlapiSubmitRecord(simulationRecord); return simulationKey;}