Epicor in Visual Studio

Hello,

I would like to know how to run an Epicor part description search using Visual Studio.

Which .dll references do I need to use, and how can I call the search?

I already know how to login and access to the Epicor database from Visual Studio.

Thanks,

I am sure there are several ways, the first that comes to mind is use the PartAdapter.dll or Part BO

Chris,

How can I use PartBO to search under the part description?

Using PartBO, I have the following:

  • partBO.FindFirstPart
  • partBO.FindPart
  • partBO.FindPartAndGetRowID()

None of them is letting me search the part description.

Thanks!

Once again, you have a few options, probably the most straightforward is:

//public PartListDataSet GetList(string whereClause, int pageSize, int absolutePage, out bool morePages)
string wc = string.Format("PartDesc = '{0}'",mydescription);
bool more;
PartListDataSet myResults = PartBO.GetList(wc, 100, 0, out more);

This might also be a good use case for BOReader, there are several threads on the forum you can find about it.

Edit - I see you are E9, the call may be slightly different, I dont have an E9 dll that I can decompile to tell you the signature of that function.

Also, if you have access to the Business Object Logic Tester (BLTester), you can interact with the BOs from a simple screen to work out your calling sequences. You should have a BLTester installer in one of your E9 server folders if I recall.

Mark W.

Good idea. I think its in supplemental installs folder

1 Like

You guys are great! Thanks for helping me!

Chris,

I was to run your code in Epicor 9.

Currently it is only looking for parts that match the full description. Is it possible to search for just a part of the description?

Thanks,

string wc = string.Format(“PartDesc like ‘%{0}%’”,mydescription);

1 Like

Amazing! It worked exactly like I wanted!

Thanks a lot!

Have a great weekend!

1 Like