Adapter Documentation

Is there any documentation on EpicWeb regarding the different Adapters in E10, and how to use them? They have changed a bit since E9, and I am running into issues trying to use some of them now. Once in a while when I run into a problem I ask on here for some advice in what I am doing wrong, but I would like to be able to look up the information on my own.

I am told there is an ICE_SDK25_BO_Methods.pdf floating around somewhere, and that it may be able to help me, but I can’t find it anywhere.

https://epicweb.epicor.com/doc/Docs/ERP_BO_Ref_101600.zip

There’s a BO reference in EpicWeb. But it won’t tell you much other than what the BO’s are.

1 Like

@josecgomez

I downloaded that yesterday and began looking through it, and I did find the LaborSvcContract which looks like it is what I would want to use. However, this is where my ignorance with Epicor comes in. For instance, how am I to determine how I should set/get data from the database? Should I use a LaborAdapter (Erp.Adapters.LaborAdapter)? I thought that would have been the same as Epicor.Mfg.BO.Labor was in E9, but it is not.

LaborSvcContract on the other hand does look closer to what Epicor.Mfg.BO.Labor was in E9, but I don’t know how to be sure. One of the big noticible differences that I see is that LaborSvcContract has the same syntax that I was using in E9 (for .GetRows, Update, etc) but it uses Tablesets (?), while LaborAdapter is using DataSets as I am used to using but the signatures of the methods are completely different.

It boils down to “I don’t konw what I don’t know”. And not knowing is the hardest part of it all. I am finding myself becoming more frustrated as the days go on. It has been close to a month that I have been working on this, and I am still basically stuck at the beginning, trying to get the LaborAdapter stuff figured out.

I was feeling the same as you as now a couple of months ago. I hadn’t ever got my head around using adapters etc, but I think I now have a bit of an understanding (enough to be dangerous)!

If you want to retrieve 1 bit of data, or perform 1 method call where you can pass in everything you need then you can use the contract.

If you want to call multiple methods from the same Business Object, then you can use an adapter – what the adapter does for you is to persist the dataset between calls.

1 Like

@markdamen
So, if I am understanding you correctly, I would want to use an adapter (In my case, a LaborAdapter).
The quick ‘nitty gritty’ of what I am doing is this: We added a ‘Lunch Out’ button to MES, and when a user clicks it our customization runs and gets a listing of all LaborDtl that user is clocked into, then it changes the value of CheckBox01 for each of those LaborDtl as well as the LaborHed (Where ActiveTrans=True). It then EndsActivity.

When they come back from lunch, the customization automatically logs them back INTO the jobs they were in prior to lunch. It does this by looking for CheckBox01 being set in LaborDtl and LaborHed where the EmployeeNum is that of the specific user.

So, in this scenario, it is an Adapter I would want to use.

You had stated that the adapter persists the data between calls (IE: before I .Dispose() of it). I assume that using the .Update() Method on the adapter takes any changes I have made, and writes them back to the database?

I feel your pain - we’ve all been there and it slowly gets better with time.

In your description - you could probably benefit from using a BAQ to list those records and Jose’s great tutorial on how to use the DynamicQueryAdapter to get that data back. I find I use this method ALOT.

Jason,
I recommend some through reading of the Ice Customization Guide, the Ice Tools Guide, the Programmers Guide and all the Tech Reference Documents in EpicWeb.
Then you should be able to use tools like Tracing to see which BO’s need to be called when a certain action takes place.
The Customization Guide has some examples of calling adapters, and there are several examples in here too.

In your example you should look at what methods / bo’s are called by Epicor to Clock someone In / Out of a Job. It is the Labor Business Object. Upadate is a good method to call to commit data to a dataset. For example set CheckBox01 for the LaborDtl to true. You would then call Update. But to perform actions Clock In / Clock Out there are sequences of calls that need to be made and you can get those from the Trace

3 Likes

@jhecker Did you get this customization to work? I’ve just been recently asked to do exactly the same thing for my company.

Hi, I’ve been trying to download the zip but it requires credentials. how can I download this document?

Login with your epicweb credentials

Going to share this link, there are other useful articles Quick And Easy Epicor Data Lookups Via Code — GingerHelp

Remember that there are multiple ways to get data this is just one example

4 Likes

I already used my credentials but, it didn´t work

Hey Jason, did you get this figured out? I’m in a similar position in that I recognize that I must use the Adapter but I am having no luck in finding the assembly nor in getting a response from others.