amontas
(Alexis Montas)
November 2, 2018, 2:36pm
1
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,
Chris_Conn
(Chris Conn)
November 2, 2018, 2:44pm
2
I am sure there are several ways, the first that comes to mind is use the PartAdapter.dll or Part BO
amontas
(Alexis Montas)
November 2, 2018, 3:18pm
3
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!
Chris_Conn
(Chris Conn)
November 2, 2018, 4:36pm
4
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.
Chris_Conn
(Chris Conn)
November 2, 2018, 5:28pm
6
Good idea. I think its in supplemental installs folder
1 Like
amontas
(Alexis Montas)
November 2, 2018, 6:21pm
7
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,
Chris_Conn
(Chris Conn)
November 2, 2018, 6:24pm
8
string wc = string.Format(“PartDesc like ‘%{0}%’”,mydescription);
1 Like
amontas
(Alexis Montas)
November 2, 2018, 7:42pm
9
Amazing! It worked exactly like I wanted!
Thanks a lot!
Have a great weekend!
1 Like