This topic contains 6 replies, has 0 voices, and was last updated by dmashburn3 8 years, 3 months ago.

  • Author
    Posts
  • #6205

    mcook

    We 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.

  • #6206

    al3xicon

    For 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!

  • #6207

    khultquist

    It 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.

  • #6208

    al3xicon

    Just 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.

  • #6209

    mcook

    Thanks 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.

  • #6210

    al3xicon

    Cheers and welcome to NetSuite! Your JS experience will come quite in handy, as you’ve likely already realized.

  • #6211

    dmashburn3

    Wow, that XML trick is a nice one to have ready! You just saved me hours out of my scripting future. Thanks!

You must be logged in to reply to this topic.