Want to know what method is causing the update to a related table

Yes, we should upgrade.

But… we aren’t on latest and greatest and I am trying to revert the company back to using masterpack.

Right now we put everything on 1 shiphead and then use the invoice comment field on each pack line to put a “skid number” so we can count how many skids are in our shipment and identify what skid each product is on. this was done back when they switched to 10.0 from vantage and something was super messed up with masterpack after go-live so they did what they had to do.

This all comes with a multitude of workarounds to change base reports to adopt this logic as well as takes away a lot of functionality when it comes to the shipping module and the picking modules…

Anyways… we use BOL entry now and when we hopefully switch to using mast packs we would need to link master packs to the BOL. What I am finding is that the BOL service method “UpdateLinks” is properly linking the masterpack to the BOL, BUT, BUT, it is also going out and updating any customer shipments with the same packnumber as the masterpack with the BOL number and that’s just wrong :frowning: .

This is problematic because now old packs are being updated with BOLs from 2024 simply because the masterpack number and the shiphead.pack number are the same… I’m fairly positive this is a bug, but maybe I could just start the masterpack number way higher than the customer shipment number, but that seems really hacky.

Anyways, bottom line, I want to use materpacks and my shipping department needs to use BOL entry and if I can’t get this to work, well, I guess I can’t get us back to using master packs.

I have identified that after “update links” is called the problem occurs. My thought is, maybe I write a data directive on ship head??? cause I don’t see any way to handle this in the BPM… nothing in BOL the method trace shows the shiphead.BOLNum being updated or returned except for afterwards in the return parameter dataset in the update links method… and that’s too late.

I’m looking for any ideas or guidance from anyone who has tried to work around a bug like this…

My thing is, can I see, in a data directive, where this is coming from? Maybe callcontext? Sheesh.

If there is nothing in the trace, then the update is likely happening in the update base method for that BO.

Your only play may be a data directive.

1 Like

As investigation hack you can throw exception inside data directive, catch it and dump it with stack trace to the log. You will see where it is called from :slight_smile:

1 Like

ohhh okay Olga, I will do that. I have to figure out how to catch and dump it…

It is possible, just make the new start very large. I separated customer and misc. shipments when we started in 2012 by 80,000, but we have now some overlap which can cause some oddness.

Resolution


This is not something that can be done through the core application at this time.

Currently you will need to request data fix OF_Ins_MasterPack_NewStartNum.df from support.

https://epiccare.epicor.com/epiccare?id=epiccare_kb_article&table=kb_knowledge&sys_id=96586a6b1beae4d04cd5b9d51a4bcbfa

1 Like

I can see that it’s BOLUpdateLinks. I can see it even with DB logging.

My thing is, can I create something to pass like callcontext value saying, “utah catch this if you see it” or something like that.

Thanks for responding it’s lateish (kudos to all you out there working later) on a Friday I’m out.

Thank you Greg, I will see if I can just do that and be done with this, but we make so many more packs than we do master packs so I eventually will run into the same thing.

I wonder if this is still an issue on kinetic… I may jump in and see on Monday.

I gotta dig up @hkeric.wci or @josecgomez 's posts on callcontextBPM to understand how that all works again for the life of the transaction scope.

In this case I am doing and update on BOL, but that is spanning a bunch of different table updates apart from those in the dataviews on the screen… so I believe I can loop through the ds tables in the BOLsvc.UpdateLinks method call and sort out which packs that I’m linking are masterpacks and which are regular packs cause there is a flag called “MAsterpack” which is true or false. And since I know that I can store all of the regular pack IDs in an array or something in a call context field as well as an indicator that this is being called from the BOL.UpdateLinks so that on a data directive in ship head I can investigate calls that are updating shiphead from BOL.updatelinks and that are updating shipheads originating from a linked packs call…

I gotta sleep on it. Thank you @Olga for your input and anything you can tell me about callcontextBPM data and how I am intending to use it here. I’ll look into it myself as well.

Like this @Olga

I am trying to make sense of these two posts from these two very talented people.

Can I use call contextBPMdata.Character01 on BOL.UpdateLinks method directive and rely firmly on it being passed to the callcontextBPMData.Charcter01 value for the data directive on shiphead… I tried it out and I see that the value is passing, it’s actually working, which is super cool and maybe an answer to this whole thing… but I’d love to understand WHY it works or a little more about callContextBpmData… I know I have over the years but I never put it all together and tinkered with it to solidify a complete understanding.

https://www.epiusers.help/t/callcontextbpmdata-hack/54893/9?u=utaylor

https://www.epiusers.help/t/callcontextbpmdata-hack/54893/10?u=utaylor

CallContext is a header, that is attached to the REST call. So if you are inside REST call that sets this header, then it should work. If it is something asynchronous like scheduled task, then you won’t have that header.

2 Likes

If @olga doesn’t get you straight, I can spend some time on this later.

I’m not available at the moment.

1 Like

Thanks Olga, it’s getting clearer and clearer to me. I appreciate it.

My last question is though is, when does the callcontextBPMdata get cleared and reset back to it’s initial values (empty)?

Is it only when I close the BOL form?

In other words, what is the life of the CallContextBPMData? When does it get disposed?

Kevin I appreciate it man, good luck with the rest of your day.

1 Like

The CallContextBPMData stay open until the client closes.

We have to clear it after it is used in a Method/Data directive, so it doesn’t conflict with other Method/Data directives.

You have to be careful using them a bit.

1 Like

Thanks Ken, I appreciate it.

I am not very familar with it, but it looks like it is recreated on form start. And cleared ny default when Clear button is clicked.