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

  • Author
    Posts
  • #22545

    alcatrav

    In creating a Saved Search for SALES ORDERS, I want to show the most recent date for any Item Fulfilment transaction of status 'PACKED'.

    The saved search is for "transactions" filtered to type = sales order.

    I can then get the date for item fulfilments using "fulfilling/receiving transactions fields….." date.

    However, this only picks up fulfilments that are of SHIPPED status. It does not include fulfilments that are just picked or packed. I have no idea why.

    Does anyone know how to produce a saved search by sales order, and show the related picked/packed fulfilment transactions.

    (I can't start with the transaction type being an item fulfilment due to other requirements of the search).

    Only thought at the moment is to somehow save the date back to the sales order using a workflow or similar?
    This is a cached copy. Click here to see the original post.

  • #22546

    alcatrav

    For reference, I got a workaround by creating a workflow and updating a custom field on the sales order every time a fulfilment is saved

    Handy references:

    https://netsuite.custhelp.com/app/an…il/a_id/10580/

    http://blog.prolecto.com/2015/08/16/…h-suitescript/

    function onSave()

    {

    var tran_date = nlapiGetFieldValue('trandate');

    var so_id = nlapiGetFieldValue('createdfrom');

    var record = nlapiLoadRecord('salesorder', so_id);

    var so_last_date = record.getFieldValue('custbody_so_last_fulfilment_ date');

    if (tran_date > so_last_date || so_last_date == null) {

    record.setFieldValue('custbody_so_last_fulfilment_ date', tran_date);

    nlapiSubmitRecord(record);

    }

    return true;

    }

    Attached Files

You must be logged in to reply to this topic.