Write on Production table using script

SOLVED

Are we able to write on the Production table from the Sales Order Entry UI?

I have items that based on the S/O Entry need to be put on a Production Entry so was wondering if after they are entered in the SO and the Picking Sheet is printed, I can write this items in a new Batch and set the required fields in the Production based on lines from the S/O details.

Parents
  • 0

    You can use the BM_Production_Bus object to write production entries.  However, there isn't an event that you can attach a script to in order to catch when the picking sheet is printed.  You can however attempt to replace hide the default quick print picking sheet button and put a custom button over it in which you call the oUIObj.BT_QPPicking method and followed by your code to create the production entry where you can check the value of PickingSheetPrinted$ before you create the production entry (depending on SO Options, you may need to reread the sales order in order to get the value for PickingSheetPrinted$).

  • 0 in reply to David Speck

    Thanks David,

    Related to the above...
    I have a UDF in the lines with 3 options, I am trying to update a UDF on the header if any line has a value in the UDF.
    It seems simple but I cant get it to work.
    Any suggestions?

    I tried a pre-write/post-write/post-validate on the detail, but I am not sure how to get it to look through all the lines and IF any of them have that UDF filled out to set Header UDF to "Y"

Reply
  • 0 in reply to David Speck

    Thanks David,

    Related to the above...
    I have a UDF in the lines with 3 options, I am trying to update a UDF on the header if any line has a value in the UDF.
    It seems simple but I cant get it to work.
    Any suggestions?

    I tried a pre-write/post-write/post-validate on the detail, but I am not sure how to get it to look through all the lines and IF any of them have that UDF filled out to set Header UDF to "Y"

Children