Let me reinforcement this statement
You “NEVER” want to make a direct SQL connection from the client. This is absolutely positively bad practice and it can lead to major headaches down the road. Not sure if I am being clear enough so i’ll say it again… NEVER EVER NEVER NEVER NEVER EVER EVER do this ![]()
The example that @Aaron_Moreng provided is a great one, you can also do it without writing any code by using FKV (Foreign Key View)
[FKV Page 457]
https://epicweb.epicor.com/doc/Docs/EpicorCustomization_UserGuide_101600.pdf