This topic contains 6 replies, has 0 voices, and was last updated by dmashburn3 8 years, 3 months ago.
-
AuthorPosts
-
August 17, 2016 at 8:35 am #6205
mcookWe are attempting to enter an Item value at the Sales Order Line level and determine if that value already exists as a key in a custom file. If the value exists, we want to extract data from the custom file and populate portions of the Sales Order Line currently being created. One of the fields we want to populate is the Line Item value, replacing the Item value we originally placed in the field. I know js but am new to Netsuite and am having trouble recognizing when a value has been entered into the Sales Order Line Item field. I have a script that works fine for an item value change on fields where I can actually determine the internal field name but can find no such attribute at the Line Item level. Can some point me in the right direction?
This is a cached copy. Click here to see the original post. -
August 17, 2016 at 8:38 am #6206
al3xiconFor field names at the column / line level, I recommend using the SuiteScript Records Browser: https://system.netsuite.com/help/hel…alesorder.html
Sounds like what I would do if I were you is import the custom file data as a custom record into NetSuite and then script against it.
Hope this helps, good luck!
-
August 17, 2016 at 9:03 am #6207
khultquistIt can be hard to get the field names in lines, and al3xicon is right about using the SuiteScript Records Browser. There are a few other ways too, you can look at the html source and kinda get the field name. But even better is to write a script that returns the field name when the field value is changed. Create a Client Script record, set the Field Changed value, make sure it’s in Testing, and then deploy it to Sales Orders. Then just toggle the deployment on and off as needed.
Code:
function fieldchange(type, name) {
alert(name);
}
Also, you might consider getting the data out of your custom file and into the Item records as custom fields. This will speed up the UI. -
August 17, 2016 at 9:20 am #6208
al3xiconJust remembered also another option for finding field IDs is adding “&xml=T” to the end of your sales order URL – this will show you the XML data for the SO and should break down all field IDs.
-
August 17, 2016 at 9:25 am #6209
mcookThanks for the quick responses. I will try your suggestions.and see where they lead. Luckily we are not yet in a Netsuite production environment, so I can experiment somewhat.
-
August 17, 2016 at 9:26 am #6210
al3xiconCheers and welcome to NetSuite! Your JS experience will come quite in handy, as you’ve likely already realized.
-
August 18, 2016 at 12:09 pm #6211
dmashburn3Wow, that XML trick is a nice one to have ready! You just saved me hours out of my scripting future. Thanks!
-
AuthorPosts
You must be logged in to reply to this topic.