Hi,
I have deployed a scheduled script that sun over orders and edit one field. based on saved search results. below is the full code for the script.
saved search with internal id 3102 created to excluded orders from the system.
the script was waorking well for years, but on October 17, 2025 (before 2 days) it is run on all orders and ignore the saved seach results (run over the excluded orders) and it edits all saled orders in system till the script tme exceeds the limit…
Is there any update done from NS that let the script ignore the saved search?
Note that the saved search and scripts are not updated by us, and when I open the saved search results, it is empty as it should be.
Any idea!!!
function moving()
{
var searchresults=nlapiSearchRecord('salesorder',3102, null, null );
if(searchresults)
{
nlapiLogExecution('DEBUG', 'searchresults',searchresults.length)
for(var so_counter = 0; so_counter < searchresults.length; so_counter++)
{
//var so_synced_system = searchresults[so_counter].getValue('custbody_f3mg_magento_store');
//nlapiLogExecution('DEBUG', 'searchresults' + so_counter,so_synced_system);
var SalesOrder = nlapiLoadRecord(searchresults[so_counter].getRecordType(), searchresults[so_counter].getId());
var g=SalesOrder.setFieldValue('custbody_f3mg_magento_store','1');
var id=nlapiSubmitRecord(SalesOrder,true,true);
}//end for SO counter
}//end if searchresults
}//end function