Maximo Open Forum

 View Only
  • 1.  Copy Fields from WPMATERIAL to PRLINE when PR is Auto-Created

    Posted 07-05-2023 16:14
    Edited by Shannon Stommel 07-05-2023 16:14
    We are trying to copy a field from the wpmaterial object to the prline object when a new PR is auto-created by the Reorder Cron Task.  This is for when the user adds a Planned Material Item on a Work Order that needs to be ordered thus firing the Reorder Cron Task to create a Purchase Requisition.
    I created a new Automation Script named PRLINE.NEW but there seems to be a timing issue with when the Reorder Cron Task runs. I tried PRLINE.SAVE and adding a new crossover domain which neither worked.  With wpmaterial being a view I tried pulling in the data from wpitem which also did not work.
     
    Do you know if there's a way to add a field to what the ReorderCronTask is copying from the Work Order Planned Material item to the PR Line row?  There seems to be other fields that are being copied over to the PR Line from the wpmaterial, like Required Date.  Wondering how we can add one more field to copy to the PR Line, either by script or other means.
    Thank you, Shannon


    #MaximoApplicationSuite

    ------------------------------
    Shannon Stommel
    Insteel Wire Products
    ------------------------------



  • 2.  RE: Copy Fields from WPMATERIAL to PRLINE when PR is Auto-Created

    Posted 07-10-2023 08:57

    Shannon,

    There are persistent fields on WPITEM (and WPMATERIAL) for the PR number and PR Line number. You should try triggering a script or a crossover domain off of those fields. I haven't tried this before, so not sure if the action trigger is suppressed, but that might work.

    Hope this helps,



    ------------------------------
    Alex Walter
    A3J Group, LLC
    ------------------------------



  • 3.  RE: Copy Fields from WPMATERIAL to PRLINE when PR is Auto-Created

    Posted 07-10-2023 14:23

    Thank you for your suggestion Alex!  

    I tried creating a crossover domain and a new script to copy the field from wpmaterial to prline, however when the PR is auto-created through the Reorder Cron Task the PR doesn't seem to be linked to the Work Order or wpmaterial.  There is a relationship between the wpmaterial and prline object, but it looks like the reorder process handles the PR creation differently than if the item was a Direct Issue.  I think this may be why I the field isn't copying to the PR Line.



    ------------------------------
    Shannon Stommel
    Insteel Wire Products
    ------------------------------



  • 4.  RE: Copy Fields from WPMATERIAL to PRLINE when PR is Auto-Created

    Posted 07-11-2023 10:35

    Hi Shannon,

    We had this need a few years ago and ended up using an automation script that triggered on PRLINE Save and only on Add. We chose to use After Commit due to the issues you mentioned. The script itself consisted of getting the WPITEM set based on the PRNUM and PRLINENUM and then getting the PRLINE set again from MXServer to make the updates and save.

    I am not sure if this was the most efficient approach, but it worked for us at the time and we have not had any issues with it. If anything, I think it will give you another avenue to look down!



    ------------------------------
    Andrew Quick
    TimkenSteel
    ------------------------------