How to use IPA to run 'Move Workunits to History' function?

 5 Replies
 2 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
kflores01
Veteran Member
Posts: 43
Veteran Member
    Does anyone know the proper syntax in IPA to use the 'Move Workunits to History' function in the Rich Client?
    Woozy
    Veteran Member
    Posts: 709
    Veteran Member

      Hi kflores01,

      I haven't actually tried this, but from the LPL it appears that you don't use Workunit at all, and you have these options:
      - pass in nothing, which moves any WU which is complete or cancelled to history
      - or pass in begin and end date, which moves any WU which is complete or cancelled and the PfiWorkunit.CloseDate is between begin and end
      - or pass in a ServiceName OR a Flow Name, which moves any WU which is complete or cancelled and which has that Service or Flow Name and has any date
      - or pass in both Begin and End Date and a Service or Flow Name to combine the two options.

      Attached is the LPL for that action.

      Attachments
      Kelly Meade
      J. R. Simplot Company
      Boise, ID
      Woozy
      Veteran Member
      Posts: 709
      Veteran Member
        The call would be something like this:
        _dataArea="YourProdline" & _module="pfi" & _objectName="PfiWorkunit" & _actionName="MoveWorkunitsToHistory" & _actionOperator="NONE" & _actionType="SingleRecordQuery" & _runAsUser="" & _pageSize="30" & _relationName="" & _setName="" & _asOfDate="" & _effectiveDate="" & BeginDate="20160101" & EndDate="20160131" & ServiceName="YourServiceName"
        Kelly Meade
        J. R. Simplot Company
        Boise, ID
        John Henley
        Posts: 3353
          kflores01, what are you trying to accomplish? Are you trying to move a specific workunit, or multiple? If multiple, you can use the 'schedule move to history' action in IPA; it allows selection by service, date range/workunit age, and can be scheduled.
          Thanks for using the LawsonGuru.com forums!
          John
          kflores01
          Veteran Member
          Posts: 43
          Veteran Member
            Unfortunately, I have previously tried the above syntax and it resulted in errors in the Designer within the Landmark Transaction Builder. I also tried using 'CreateUpdateDelete' in place of Query. That resulted in the function ignoring the dates and moving all Completed Workunits to History. Thank goodness I was using our development environment. I have a feeling the function is broken.
            Woozy
            Veteran Member
            Posts: 709
            Veteran Member
              Have you tried running it manually from within Rich Client? If so, you can probably take a look at the AsyncTrigger to see what fields were populated in that call.
              Kelly Meade
              J. R. Simplot Company
              Boise, ID