Automatically set a Pack Slip on Receipt Entry

Hi

I am wanting to set the Pack Slip automatically on Receipt Entry.

I have looked at what services are called and it looks like I should create a BPM Post Processing event on Receipt.GetPOInfo. When I do this nothing appears on the screen, but when I look at the debug tool the value is shown.

When I try and save the record, I get the following error,

A valid Packing Slip is required.
Packing Slip is required.

Am I missing something simple?

Did you ever figure out a way to make this work?

Not quite. I need to revisit it.

I was able to get this to work through a single event in Kinetic, where when user enters a PO# it auto-populates the Pack Slip with PONum-MMDDYY (e.g. 628134-073026) and either loads the existing record or saves it as a new record when it doesn’t already exist.

Here’s what I did:

  1. Create my event, give it a name, save layer, close event and re-open

  2. Set trigger to Event > After > ColumnChanging_KeyFields_PONum

  3. Add event-column-disable widget and set DataTable to: KeyFields

  4. Add row-update widget

    1. Set Ep Binding to: KeyFields.PackSlip
    2. Set Expression to: ‘#_ “{RcvHead.PONum}” + “-” + (’{Constant.Month}‘).toString().padStart(2,‘0’) + (’{Constant.Day}‘).toString().padStart(2,‘0’) + (’{Constant.Year}‘).substring(2,4) _#’
  5. Add event-column-enable widget and set DataTable to: KeyFields

  6. Add rest-kinetic widget and input necessary details for use the ReceiptSvc method GetByID

    Expand for input detail screenshots

    Note: VERY IMPORTANT to check the “Suppress Exceptions” box under Call Options

  7. OnSuccess add an event-next widget for Event ID: Execute_GetByID_KeyFields

  8. OnError add another rest-kinetic widget to call the GetNewRcvHeadWithPONum method of same BO

    Expand for input detail screenshots

  9. Add an event-next widget for Event ID: SysUpdate

  10. Save, Preview, Publish, etc., etc., etc.

Proof is in the pudding

Edit: see this post below for working setup: Automatically set a Pack Slip on Receipt Entry - #9 by d_inman

Continuing the discussion from Behavior differs between app studio preview and published version…Why?:

Ugh, my changes/“fix” actually isn’t working. I tried splitting up my event like @dcamlin suggested, but it doesn’t carry over my row-update value from first event to the next.

The event that I’m triggering off of sets the RcvHead fields to what I want them to be, but I put in a console-write widget as first step in my event to write that value and it doesn’t write what the previous system event writes, but the pre-existing value that it’s passing to my rest call.

Do you know what the event-column-disable/enable actually does? I’m only using it because that system event uses it and updating the pack slip on the screen with my desired value didn’t work without them, but I have no clue what the actual purpose of those is.

I THINK the event-column-disable prevents any column-change events from firing for the target dataview.

So, in you example, its allowing you change the KeyField.Packslip without triggering any event that may have the Column-Changed > KeyFields > whateverColumn trigger.

does that make sense?

Yep, perfectly. Thanks!

Splitting into two events does actually work—I had to remove the trigger from my disabled original event for it to work properly.


Revised setup to get this to work:

  1. Create a new event that will be what checks for whether your auto-created pack slip [will be done in a different even you’ll create later] exists or not and creates new one when it does not

  2. Give it a name, save layer, close event, and then re-open

  3. Leave the trigger blank (No Trigger)

  4. Add rest-kinetic widget and input necessary details for use the ReceiptSvc method GetByID

    Expand for input detail screenshots

    Note: VERY IMPORTANT to check the “Suppress Exceptions” box under Call Options

  5. OnSuccess add an event-next widget for Event ID: Execute_GetByID_KeyFields

  6. OnError add another rest-kinetic widget to call the GetNewRcvHeadWithPONum method of same BO

    Expand for input detail screenshots

  7. Add an event-next widget for Event ID: SysUpdate

  8. Create another event give it a name, save layer, close event, and then re-open

  9. Set trigger to Event > After > ColumnChanging_KeyFields_PONum

  10. Add condition widget to check if application is read only (i.e. Tracker)

  11. Set Expression to {TransView.SysReadOnly}

  12. Click on True and add an exit widget

  13. Go back to condition widget and click on False branch

  14. Add event-column-disable widget and set DataTable to: KeyFields

  15. Add row-update widget

    1. Set Ep Binding to: KeyFields.PackSlip
    2. Set Expression to: ‘#_ “{RcvHead.PONum}” + “-” + (’{Constant.Month}‘).toString().padStart(2,‘0’) + (’{Constant.Day}‘).toString().padStart(2,‘0’) + (’{Constant.Year}‘).substring(2,4) _#’
  16. Add event-column-enable widget and set DataTable to: KeyFields

  17. Add event-next widget and for Event ID enter the name you gave to the first event you created in Step 1 above

  18. Save, Preview, Publish, etc., etc., etc.

Voilà