Nice Gabe. Good to know it’s possible but we’re in magic string territory so I wonder when it makes sense to just go with a BAQ & Layer mod.
Would love to see a generic version of this that strips all cols from SELECT list not in BAQ:
Nice Gabe. Good to know it’s possible but we’re in magic string territory so I wonder when it makes sense to just go with a BAQ & Layer mod.
Would love to see a generic version of this that strips all cols from SELECT list not in BAQ:
"I hate it when Epicor says things can’t be done, so I had to do this “one out of spite.”<
I was hoping you might say that @GabeFranco ![]()
I’m impressed! Epicor said it was impossible, but you proved them wrong, ![]()
The first few times I tried to do something like this it never took effect either, i was trying to inject a new column directly.
The cast a JObject and then DeepClone() is what made that work vs. direct injection if i recall. I had a post about Fulfillment Workbench modification where I changed the order of the objects on the search box I ran into a similar gotcha on.
The problem I was running into was app studio. yhe column exists in the grid, Nd in the data… but no dice, wtf.
I will try to cook the “strip any columns out of an executebaq request that don’t exist in the baq” logic up tonight, should be pretty straight forward.
I think that this methodology isn’t too deep in “magic string” territory, I just didn’t use smart selectors and stuff, instead i was lazy and used direct indices, but you can make it more robust by grabbing the components by id / guid and the columns by field, etc, and then it won’t be so brittle to base layer modifications.
The BAQ Select string is comma separated value, which has well understood methodology for stripping elements, so that should be pretty safe too.
I think upgrade survivability with this is pretty high if you code in a few more null checks and stuff, so that the worst case scenario is it doesn’t find the component it needs to and doesn’t do anything.
Mine probably worked, I probably fat fingered something in app studio lol.