Hi.
I created an Client Script that will update the ATP lead time and lead time. It is working as expected with the test item. Right now those fields get update when a user access to the location configuration if the item and refresh the window, but will be ideal to have those fields updated every night without a user intervention.
In this section of the scrip I think I am able to get all the location configuration records ID. I got those values IDs by a save search.
define(['N/record'], (record) =>{
function fieldChanged(context){
//This section will the the Item Location Configuration Records ID
//from the save search ATP Lead time list export
var searchresults = nlapiSearchRecor('ItemLocationConfiguration','customsearch2503');
for (var i = 0; i < searchresults.lenght; i++)
{
var searchresults = searchresults[i];
var itemlocID = searchresults.getValue('internalid');
//This section will Load the record
var itemLocConfigRec = record.load({
type: record.Type.ITEM_LOCATION_CONFIGURATION,
id: itemlocID, //this line will be the items location config record
});
The rest of the script not showing here will get and set the values on the item.
I would like to know what I need to do with my script schedule and does update the field every day?