How to delete or filter particula items from the record sublist?

Comments

1 comment

  • Brian Brown

    This function should suffice.  Just replace the custcol field name, then inside the filter function supply the criteria you wish to use for those lines you want to keep.  In this case, I wanted to only keep those lines where custcol_fj_sf_id was blank.

     

    function preMap (options) {
      
      var itemsarray = options.data[0].item;
      
        options.data[0].item = itemsarray.filter(function(itemlines){
          
          return !itemlines.custcol_fj_sf_id;
          
        });
        
      return options;
    }

    0

Please sign in to leave a comment.