This topic contains 1 reply, has 0 voices, and was last updated by rnedelkow 6 years, 11 months ago.

  • Author
    Posts
  • #21389

    Brandon

    UPDATE: So for the reallocation page id want it to

    -Count the number of lines

    – use a for loop to output order number, customer and quantity committed.

    -I'd like for this to run both before submit and after submit. That should get it to show me what the original quantity committed were and the new quantity committed are now.

    useing

    var lineCount = nlapiGetLineItemCount('quantitycommitted');

    seems like it would get me the number of lines but is getting out '-1' instead.

    —–

    Original

    I'm a new admin and i've been trying to figure out this long term issue we have been having.

    Id need to write a script in the reallocation item page so that whenever somebody changes a value on that page, the

    execution log spits out the item that was changed, the previous value of qty committed and the new value of qty committed.

    Ive looked around on netsuit, support sites and forums and haven’t found anything helpful.

    Im not sure what netsuite internally would call qty committed.

    this is as far as i've gotten

    api 1.0

    var STOIC = STOIC || {};

    STOIC.example = (function () {

    var exports= { };

    function beforeSubmit(item) {

    var NumLines= nlapisGetLineItemCount(‘item’);

    for ( var I = 1; i < NumLines + 1; i++)

    // something along the lines ofโ€ฆ

    // if ( original quantity* != current qty*)

    //nlapiLogExecution(“debug”, ???, itemname* “old:” + original qty + ” new:” + new qty*);

    })();

    *what does netsuite call these internally?

    Thanks so much
    This is a cached copy. Click here to see the original post.

  • #21390

    rnedelkow

    Hi Brandon, you posted this in the SuitePeople Core HR forum. I moved your topic to the scripting forum.

You must be logged in to reply to this topic.