This topic contains 4 replies, has 0 voices, and was last updated by tect22 8 years ago.

  • Author
    Posts
  • #6232 Score: 0

    jmessersmith
    • Contributions: 0
    • Level 1

    I am trying to loop through all the Pending Fulfillment Transfer Orders. Every time I add the status filter I get zero results. I’ve tried it a number of ways but every time I end up with no records returned. I know there is records out there from a saved search I am running. What am I doing wrong with the status filter?

    Code:
    function test(){
    var recordType = [“TrnfrOrd”];
    // Define search filters
    var f = new Array();
    f[0] = new nlobjSearchFilter (‘type’, null, ‘anyof’, recordType);
    f[1] = new nlobjSearchFilter (‘item’, null, ‘anyof’, 2290966);
    f[2] = new nlobjSearchFilter (‘mainline’, null, ‘is’, ‘F’);
    f[3] = new nlobjSearchFilter (‘status’, null, ‘anyof’, ‘pendingFulfillment’);
    // Define search columns
    var c = new Array();
    c[0] = new nlobjSearchColumn(‘entity’);
    c[1] = new nlobjSearchColumn(‘tranid’);
    c[2] = new nlobjSearchColumn(‘status’);
    // Search for child records
    var r = nlapiSearchRecord(‘transaction’, null, f, c);

    if (r==null){
    //return true;
    alert(‘not found’);
    }else{
    //return false;
    alert(r.length);
    for (var i = 1; i < r.length; i++){ alert("|"+ r[i].getValue(c[2])+"|"); } } }
    This is a cached copy. Click here to see the original post.

  • #6233 Score: 0

    david.smith
    • Contributions: 0
    • Level 1

    Try this from your “edit” page of your saved search:

    https://chrome.google.com/webstore/d…epdmfaihdokglp

  • #6234 Score: 0

    jmessersmith
    • Contributions: 0
    • Level 1

    Sweet tool, found it. Thanks. Let me know if you have any other ones.

    TrnfrOrd:B

  • #6235 Score: 0

    david.smith
    • Contributions: 0
    • Level 1

    I do. Check the related tab of the this one and you’ll find two more.

  • #6236 Score: 0

    tect22
    • Contributions: 0
    • Level 1

    Whoa, nice David.

You must be logged in to reply to this topic.