This topic contains 6 replies, has 0 voices, and was last updated by qpongrass 6 years, 7 months ago.

  • Author
    Posts
  • #21309 Score: 0

    qpongrass
    • Contributions: 0
    • Level 1

    Is it possible to set the inventory details (bin, qty) on user event BeforeLoad or client Onchange?
    This is a cached copy. Click here to see the original post.

  • #21310 Score: 0

    kphu
    • Contributions: 0
    • Level 1

    Personally I'm having an issue understanding your question so its difficult to provide a valid response.

    Are you asking is it possible to look up inventory details for an item (assuming there is a way for the system to get the item in question) and return the details to the user? This would be possible depending on the context of where and how you want to return the information i.e. via a pop up message box vs a field value of some sort.

  • #21311 Score: 0

    qpongrass
    • Contributions: 0
    • Level 1

    Sorry for the vague post…here's more:

    I have created a custom picking ticket with item, quantity and bin details. When the user clicks "fulfill" on the sales order, it take them to the fulfillment page, and on this page there is a link to the custom picking ticket. When they click the custom picking ticket it should customize the fulfillment to match the items, quantities and bins on the picking ticket. I've got the items and quantities working just fine, but I can't seem to set the bin details.

  • #21312 Score: 0

    kphu
    • Contributions: 0
    • Level 1

    Yes, this is possible but I'm curious to understand why would the picking ticket define the fulfillment record details? I would expect that the item fulfillment record should define the picking ticket. For Example: a user generates an item fulfillment record and set the status to "Pick" and manually populates the item, quantity and bin details. Once the record is saved the picking ticket can be printed from the IF record. After the user picks the goods, you can have a process to set the IF record's status to "Pack" then proceed to shipping in which the shipping department would set the IF record's status to "Shipped".

    If your operations require you to work in the manner as you described then how is the information on the custom picking ticket defined? I would use the same information to generate the picking ticket to override the details of the item fulfillment record.

    I see a couple of challenges. 1) Assuming you have multiple Bins the inventory for this item can use you'll need figure out a logic to select the appropriate bin location. For example, if you have a preferred bin location set then you can filter by Preferred Bin within a search for the item. 2) The item fulfillment record doesn't show the "Bin Number" column field under the items sublist of the item fulfillment record in NetSuite's Record browser which generally means its not supported via script. You could in theory put an alert msg in your "field change" form field script to get the script ID for the "Bin Number" field and try and get it to populate via script.

  • #21313 Score: 0

    qpongrass
    • Contributions: 0
    • Level 1

    We don't use the pick/pack/ship. We simply fulfill the SO after the items are physically picked and packed. The first step is to create a custom picking ticket so that everyone (i.e. customer service, warehouse manager, etc.) knows what is being picked.

    The custom picking ticket allows the user to select the items/quantities/bins from the sales order screen. The picker then takes the picking ticket and picks/packs the items. Then they come back to NetSuite and click fulfill. The fulfillment screen will display the custom picking ticket(s) as links. The user can click the picking ticket that they actually picked. The client script then updates the fulfillment to match items (checks items on the picking tickets, unchecks the others) and quantities and bins (setting the bins is what I'm stuck on). When they hit save, the custom picking ticket status gets changed to completed. In this way, the picker need not customize the fulfillment screen manually each time – they need only select the picking ticket they picked and the client script does the rest.

    By the way, kphu, I appreciate you taking the time to respond to my post!

  • #21314 Score: 0

    kphu
    • Contributions: 0
    • Level 1

    It sounds like the sales order has the bin location that the item was picked from? If so you can look up the bin number on the sales order to populate the IF record.

  • #21315 Score: 0

    qpongrass
    • Contributions: 0
    • Level 1

    What functions/API do I use to add the inventory detail via the client onchange script? I tried the following code (in bold) but it doesn't work and doesn't throw any error:

    var linecount = nlapiGetLineItemCount('item');

    for(i=1; i <= linecount; i++){

    var itemid = nlapiGetLineItemValue('item', 'item', i)

    var itemreceive = nlapiGetLineItemValue('item','itemreceive',i);

    var line = nlapiGetLineItemValue('item','line',i);

    //console.log(itemid + ' ' + itemreceive + ' ' + line)

    //nlapiSetLineItemValue('item', 'itemreceive', i, 'F')

    nlapiSelectLineItem('item', i)

    nlapiSetCurrentLineItemValue('item', 'itemreceive', 'F', true, true);

    nlapiSetCurrentLineItemValue('item', 'quantity', 0, true, true);

    nlapiSetCurrentLineItemValue('item', 'custcolcustom_order_quantity', 0, true, true);

    // set the item and location values on the currently selected line

    for(f=0; pickticket_item_details != null && f < pickticket_item_details.length; f++){

    if(pnvl(pickticket_item_details[f].line,true) == pnvl(line,true)){

    nlapiSetCurrentLineItemValue('item', 'itemreceive', 'T', true, true);

    nlapiSetCurrentLineItemValue('item', 'quantity', pickticket_item_details[f].quantity, true, true);

    nlapiSetCurrentLineItemValue('item', 'custcolcustom_order_quantity', pickticket_item_details[f].quantity, true, true);

    nlapiSelectNewLineItem('inventoryassignment');

    // set the item and location values on the currently selected line

    nlapiSetCurrentLineItemValue('inventoryassignment' , 'quantity', 2, true, true);

    nlapiSetCurrentLineItemValue('inventoryassignment' , 'binnumber', '5555', true, true);

    // commit the line to the database

    nlapiCommitLineItem('inventoryassignment');

    console.log('good here' + pickticket_item_details[f].binid)

    }else{

    }

    }

    // commit the line to the database

    nlapiCommitLineItem('item');

    }

You must be logged in to reply to this topic.