vendredi 25 août 2017

if statement that skips over a field if it has a string in it. Netsuite/ javascript

This is a Netsuite sales order. I created a loop that cycles through a list of line items and a variable that grabs the value of a certain field. I just need to create an if statement that will "continue" the script over if the field already has a string in it. Here is what I have so far. This is a portion of a larger script for context.

var duplicateOrder = loadRecord.getlineItemValue('custcol_transfer_order_sale', itemCounter);
      //if transfer order field is already populated then there doesn't need to be a second transfer
    if ((duplicateOrder) == null || (duplicateOrder) == ""){
        continue;
    }

Aucun commentaire:

Enregistrer un commentaire