Updating Kinetic Dataviews with Event to Show Custom Field

For this round, I setup mine just like yours. I still get that ToLower error when I trigger the event.

Do I need to change my InventoryQtyAdjBrw grid somehow? Where does my custom field get pulled into that dataview?

You would add it to the native InventoryQtyAdjBrw dataview like so:

Can you try wiring up the event to a button click to rule out your event as the issue?

I am confident my event triggers properly. I have tested it extensively with dialog boxes. Here is a screen capture of my REST ERP.
kineticevent

I still get the REST ERP resulting in error, pointing at the mysterious ToLowerCase.

Can you confirm you don’t have any method or data directive BPMs that are interfering?

Yes I am certain there are not method or data directives mucking things up.
How does the event know to fill in my Fullness_c field?

You generally have to tell it to. Since I didn’t read your original post properly, let’s start over (my bad).
First, add your column to the InventoryQtyAdjBrw dataview. You’re also going to create a new dataview for WhseBin (fill all fields with WhseBin).
Next, you’re gonna call the Erp.BO.WhseBinSvc rest-erp and within the response params, set the Param name to WhseBin, ViewName to WhseBin, and the path to returnObj.
Then you have to set up an iterative event with row-updates to take the data from the WhseBin dataview to the InventoryQtyAdjBrw dataview that has your new column.
This post outlines in a bit more detail: How To: Adding Columns to Existing Kinetic Grid - Experts’ Corner - Epicor User Help Forum (epiusers.help)

1 Like

Taking another look at this, I believe something you’re passing in or receiving back is null. “toLowerCase()” is a proper JS function that can be used, but if it’s trying to lower case a null value, then it’ll bomb. Something seems off with the dataview.

When you run it, can you go into Dev Tools and go to the network tab? Do you see a call for GetInventoryQtyAdjForPart? Does it have a response?

Yes, I see the response, and in it, I can see all the expected rows I would see in the grid. Although it is missing my Fullness_c field.

{returnObj: {,…}, parameters: {ds: {,…}}}
parameters: {ds: {,…}}
returnObj: {,…}
ExtensionTables: []
InventoryQtyAdjBrw: [{Company: "VTAERO", BinNum: "C", OnHandQty: 1, NonNettable: false, WareHseCode: "MSH",…},…]
0: {Company: "VTAERO", BinNum: "C", OnHandQty: 1, NonNettable: false, WareHseCode: "MSH",…}
1: {Company: "VTAERO", BinNum: "H1", OnHandQty: 1, NonNettable: false, WareHseCode: "MSH",…}
2: {Company: "VTAERO", BinNum: "H1", OnHandQty: 1, NonNettable: false, WareHseCode: "MSH",…}
3: {Company: "VTAERO", BinNum: "h1", OnHandQty: 82, NonNettable: false, WareHseCode: "MSH",…}
4: {Company: "VTAERO", BinNum: "h1", OnHandQty: 8, NonNettable: false, WareHseCode: "MSH",…}
5: {Company: "VTAERO", BinNum: "HFA", OnHandQty: 17, NonNettable: false, WareHseCode: "MSH",…}
6: {Company: "VTAERO", BinNum: "hfa", OnHandQty: 24, NonNettable: false, WareHseCode: "MSH",…}
7: {Company: "VTAERO", BinNum: "HFA", OnHandQty: 49, NonNettable: false, WareHseCode: "MSH",…}
8: {Company: "VTAERO", BinNum: "HFA", OnHandQty: 35, NonNettable: false, WareHseCode: "MSH",…}

Details for one of the rows:

0: {Company: "VTAERO", BinNum: "C", OnHandQty: 1, NonNettable: false, WareHseCode: "MSH",…}
AttributeSetDescription: null
AttributeSetID: 0
AttributeSetShortDescription: null
BaseOnHandQty: 1
BaseOnHandUOM: "EA"
BinNum: "C"
BinType: "Std"
BinTypeDesc: "Standard"
Company: "VTAERO"
ItemPCID: ""
LotNum: "VATESTLOT1"
NonNettable: false
NumberOfPieces: 0
OnHandQty: 1
PCID: ""
PartAttrClassID: null
PartNum: "(removed)"
RowMod: ""
SendToFSA: false
StkUOMCode: "EA"
StkUOMDesc: "Each"
SysRowID: "bd536ac1-93cc-4640-9df5-573f93375ef2"
WareHseCode: "MSH"
WhseBinDesc: "MS HARDWARE - C"

Okay, so first step is going to be to change it over to use the WhseBinSvc instead of the InventoryQtyAdjSvc and populate a new view called WhseBin.
Once done, validate through Dev Tools that WhseBin has a response, including your UD column.

1 Like

Using GetByID?

Yeah, that should be fine.
If it doesn’t get the info you need, switch it over to GetRows.

I got an event to populate my new WhseBin view with a single row, and it does have my custom field reported correctly in it. Do I need to use GetRows to pull all the records? If so, what should I use as a where statement?

Are you trying to get all the bins in a warehouse? What’s the criteria you’re looking for?

I want the Warehouse Bin list to populate like it normally does in Quantity Adjust. Only with my Fullness_c value for each bin. The Fullness_c is a custom field that I added to the WhseBin table.

Okay, then you can use GetRows with the following Params:
whereClause:

WarehouseCode = '{InventoryQtyAdjBrw.WareHseCode}' 

pageSize: 50 (or whatever number of rows you want pagenated)
absolutePage: 0

That will get all the rows within that warehouse. You’ll want to have an additional event trigger when you change the warehouse in the Qty Adjust screen so that it changes accordingly.

Alternatively, for the whereClause, you can send 1=1 to get literally all the rows. ***This could be a very large dataset depending on your data and could make things slow, but the upside is it’s a one-time call with all the data, so no need for subsequent rest calls.

I really appreciate you taking the time to help me with this.
This is all so confusing! I looked at your other post on adding columns to existing grids. This seems so much more complicated than before. I can’t believe it is this difficult to add a single field to an existing grid.

I got my WhseBin dataview to populate with getrows. As you said, it shows all the bins in the warehouse. Not just the bins that contain my parts. The details do contain my Fullness_c field, so that part is kind of working. But, I am looking for all the bins that the Quantity Adjust - Warehouse Bins grid would normally have in it. I added the part number to the where statement. Although the syntax works, since part number is not part of the WhseBins table or dataview, it returns nothing.

How do I return all the rows that the grid would normally return, just tack on my extra field to it?

1 Like

Whelp, I think the easiest way at this point would be to create a BAQ with all of the data you need, then use REST to call that.

So I can’t use InventoryQtyAdjSvc and GetInventoryQtyAdjBrw to pull in my custom field?

Not unless those service have access to the WhseBin table which it didn’t look like it did.

The method GetInventoryQtyAdjBrw must have some access to WhseBin, as it lists the bins. Could this be accomplished by using the parent/child relationships in the dataviews?