Part Parent

Where is PartRev, Part and PartPlants defined? (In your customization)

1 Like

How can I use Db.PartMtl.With(LockHint.NoLock)

But this is a customization Db is not in the customization… is this not a customization?

You can’t access DB context in a customization you have to use a BAQ.

2 Likes

Decided to loop over a mtl dataview to grab mtlnums that I’ll need to run my getById and update for sites

why poop

Workable but not a desired, scalable, or futureproof approach. You’ll some day come back to it and wonder what was i thinking but that’s ok we all do lol

2 Likes

Just teasing ya :rofl:

So, GetByID is a really heavy solution GetBYID get s a LOT of information, I recommend you try either BOReader or call a BAQ to pull a few fields out of a table.

1 Like

That’s kind of why I’m leaving a trail of what seems like easy things. Thanks guys. Got the adapter set up. Should be relatively easy from here.

1 Like

You really put up with a lot of my dumb questions. Thanks for your perseverance

There are no dumb questions :slight_smile:

3 Likes
2 Likes

Trust me. Others are learning from this thread who didn’t have the willingness to ask. So thanks for being here.

1 Like

Okay. So I can’t use an adapter with methods to complete my objective? Looking at methods on PartAdapter. Not seeing much of worth. I guess my next stop is tracing to see what is called when a part is loaded.

Tracing should always be your first step.
Step back
Do the whole process manaully with trace on
Then follow the trace with code
Recipe for success

Poke around the forum I wrote a utility to help you parse the trace file too

3 Likes

This would be a lot easier with a restful crud api

And if I understand Bart’s novella on Epicor Functions, you’ll be able to do just that. Start planning your 10.2.500 upgrade!

1 Like

But that doesn’t let you skip understanding the basics, the BO’s, the tables, and the rest of the Epicor stuff. Functions just gives you a way to not have to repeat yourself. REST simply exposes the same stuff that’s already there, if you can’t do it with the tools in the system, you aren’t going to be able to do it with REST outside of the system (except for maybe so weird security type issues)

You’re right but at least all of the calls can be done in the function and then you expose the function endpoint to REST and get the CRUD we’re looking for. Hide all that implementation details.

1 Like

I have a background in web applications and have worked a lot with RESTful api’s. That’s what I’m used to doing. Still not fully up to date with Epicor but that’s why I keep doing and learning. Just stating an opinion

And I get that. Once you start needing stuff outside of epicor, you’re going to be way ahead of the game. But it doesn’t really let you skip any of the business rules, as the REST Api’s are just wrappers on the Epicor BO’s anyways, so you still need to know that to make it work.You’ll still need to be able to trace and replicate the flow that Epicor has in place, even with REST.

2 Likes