Utilizing data from another table with BPMs and/or data rules

Good afternoon,

I am trying to customize the Requisition Entry form with something that feels simple, but has been causing me a lot of trouble. I am pretty new to Kinetic/Epicor so I am still figuring out how to get data around.

What I am trying to do is when a Requestor is selected from the drop down, the user’s address populates. I know it is pulling data from the UserID table for the dropdown somehow but unsure how I can bring additional data over here. Would I have to remove the standard address fields and created UD fields and EP.bind those to the UserID table? I have it working as a BAQ where the userID is linked to the RequestorID and that works fine, shows the address, requisition ID, requestor, everything correctly, but unsure how to mimic that effect in the form.

Currently, what it seems to do, is automatically select me as the Requestor because I am signed in as me, but we’d like the option to request things on behalf of someone else, and if that person has a different address, we’d like that to be pulled from their account details.

Thank you for any advice you could give on this.

In a classic trace file or a browser dev tracking see what method is firing something like ChangeRequestor and in post processing of that add in a message box to see if it gets hit. If so then you can add a bpm there to grab data and populate the address.

Hi Greg,

When I do a browser dev tracking (Network tab after hitting F12), when I click the dropdown it calls GetList and when I select a different name, it doesn’t show anything

image

Sorry, I don’t do much browser work yet. I would assume you would have to build your own on change event and call the data from your baq to populate the address.

How would I call data from a BAQ in a change event?

Sorry, I don’t know.

Hey Mack,

There are a couple of ways to achieve the desired outcome. Depending on the use case you can go with either of the following approaches.

  1. Approach 1 (Method Directive)
    Write a Pre-Processing BPM on Erp.BO.Req.Update with a condition to check if the value of RequisitionID is changed from any to any then use LINQ or BAQ to get the ship to address from the Users table and update the relevant fields in the dataset. The only downside of this approach is that users won’t see the updated address until they click the save button.

  1. Approach 2 (Kinetic UX customization): Create a new custom layer on the Requisition app and a custom OnChange event on the Requisition ID. Please see the screenshot attached with the properties you would need to set. Once you have that, just call the BAQ (using Erp-BAQ widget) or a UserSvc (using REST widget) whichever you prefer (I would go with BAQ) and pass the requisition ID in where clause to grab the information and use row-update to update the ship to address values.

Hope it helps.

Thanks
Mateen

2 Likes

Is this what you are trying to get to? If so then you will need a number of elements, reach out if you need some guidance…

EPA0018_RequisitionDeliverToReceiptEmailNotification.docx (93.6 KB)

1 Like

Hi Mateen,

I will try the second option, I am more comfortable in the App Studio and I like the idea that the fields will update as they change the requestor. Thank you so much for this.

Hi Sue,

No this isn’t what I was looking for, but this is useful to have for the future. If I have questions using this, I will reach out to you.

Thank you

Hi Mateen,

I just tried setting up this and not sure what to put in the row-update or if there is anything else in erp-baq tools. I related the User and Req tables with the UserID and the addresses populate in the BAQ correctly, when I set the Display field as the ReqHead address fields, meaning they populate with the user’s address. I have attached screenshots.

Hey Mack

You would need to create your custom view and assign it to the erp-baq widget or use the actionResult. Secondly, with row-update, you need to update the values by copying the values from the actionResult view to the ReqHead view. Please see the screenshots attached.

ReqShipToAddress

1 Like

Hi Mateen,

This was exactly what I need, I was able to get it working after adding a parameter to the BAQ and mapping that. I have never done that, so this has been very informative. Thank you for all the work you put into this.