BPM - ABL E9 to E10 Conversion

I am trying to conversion the BPM ABL code to BPM C# but I am not understanding the lines:

find first Part where Part.Company = cur-comp and Part.PartNum = PartNum no-lock no-error.
if not avail Part then do:
{lib\publishex.i &exmsg = “‘Part Does not exist’”}.

Could some provide some help or guidance?


What part are you not understanding?

1 Like

Where is the PartNum field is getting it’s value from? Because I tried to write it in C# and it was saying PartNum is undefined.

Also, the {lib\publishex.i …
That part I just used a Throw an exception

This is the code I am attempting to change it to:

Erp.Tables.Part part;

if (part.Company == “COMPANY” && part.PartNum != PartNum)
throw new System.ArgumentException(“Part does not exist”);

But getting the following error

Can you start with what is the purpose of this and where are trying to add this code? PartNum could be a parameter, but won’t know until we have more context.

1 Like

I think I figured it out. This is what I changed the ABL code to the C# code:

Erp.Tables.Part part = new Erp.Tables.Part();

if (part.Company == “COMPANY” && part.PartNum != partNum)
throw new System.ArgumentException(“Part does not exist”);

I was able to find where the input fields are defined.

Thank you.

there you go, nice.

Is this working as expected? I cant put my finger on it but it doesnt look quite.

I haven’t tested it as yet, but do you think does not look right?

This is never going to work you are making a new Part table record which will never match the incoming parameter.
You are supposed to be-looking up if the Part exists, by doing a query in the part table and comparing it to the Parameter partNum


Ahhh!! That makes sense.
How would I get the incoming Part table.

1 Like

There is no incoming partTable you have to do a lookup on the Part table using the incoming parameter.
Your ABL is doing the following

Lookup the Part record in the PartTable where the PartNum matches the current partNum parameter
If the Record isn’t found, then throw an exception

Just re-create that in your C# and you are off to the races.

1 Like

I am not the one to judge… but your profile says your a Consultant I hope that is not the case and that you picked up a gig you are not qualified to handle. :slight_smile: Since thats basics 101. I am very glad you came here for help, it shows atleast that you are genuinly trying to understand.

I’ve seen worse, Epicor Platinum, Gold Partners - Certified and Approved by Epicor and who win Awards… that write the worst code in the world and should be sued out of business.

1 Like

I did not call myself a “consultant”, it is what the system assigned and had not looked into how to change that since that was not my priority. From my very first post I clearly stated that I am VERY NEW to Epicor and Epicor Customization. Everyone on here has been extremely helpful as I try to understand and muddle through.

Oh thats good to know. @josecgomez make the system not assign it by default :smiley: I always think there are 100 consultants, every day a new one, then I see alot of people ask “Whats a BAQ” and I get confused by their Consultant Title :smiley: and then I get worried that they are taking advantage of a Poor LLC and billing them 250$/hr for something I myself wouldnt pay 5$ for.

1 Like

The system doesn’t assign that by default, it’s a checkbox the user checks when the profile is created

Anyways you can edit that flag in your profile @roywebs

1 Like

I just did.


@josecgomez should have an option for novice, not just saying “not a consultant” but to show others the level the person is at.

1 Like

Awesome that will definitely help when someone is flagged as consultant we assume a certain knowledge level so the answers may not be as helpful.

I highly recommend before proceeding much further that you take a read at the Ice Customization Guide and the Ice Tools Guide as well as the Programmers Guide in EpicWeb.

These books are invaluable as you delve further into the Epicor Customization World and will certainly cover most basic things (like this request you got)








That is very true, that would help very much when others are providing answers. Fortunately, I have been able to decipher some of the answers I have been given on here to help me out from the start. THANK YOU ALL.

Thank you. I will definitely look at those PDFs. Much appreciated!


Haha @hkeric.wci, you aint wrong, I mean look at me… :rofl: