I am trying to use Epicor Rest to call a BAQ in an external dll. I have downloaded the EpicorRestAPI nuget package successfully and created the parameters and call for a BAQ. This gave no compile errors. When I went to run a BPM which calls the method in which the rest call is located I get this error:
I am using @josecgomez helper program. I downloaded it from Nuget and it was installed Source/packages folder or our custom dll path. We have the SDK and this is how a consultant set it up for us.
I didn’t write a specific program for this. The code that executes the call is part of a custom external dll that Epicor BPMs can access and utilize.
When you build your program, does the resulting folder contain the EpicorRestAPI.dll? If so, drag that into the server assembly folder just like your program. It can’t find it when your program references it.
Is all you are doing running a BAQ? You can query data directly in a BPM using Linq like the solution here, and if all the external assembly does is call BAQs, it is over-complicating the process significantly.
I tried moving the dll to the server folder where our custom dll resides and I got the same error.
No the dll is extensive with other functionality. I am simply trying to run a BAQ rest call to test. I might pursue other avenues if I can’t resolve the error or use HTTPClient instead.
If you are on 10.1.600 still, there’s a chance you can’t run the binary. Is the latest .NET SDK installed on the server? His binary is compatible with .NET 4.8. I can’t remember if it is backwards compatible, but if it is, it would require the latest SDK.
I figured 10.2.700 required .NET 4.8. Maybe partially since none of the code features of 4.8 are available.
Typically, you’d only run into that specific .NET error when the file actually does not exist where expected (in your case, you have MyCustomServerCode.dll referencing EpicorRestAPI.dll, in the same folder unless specified otherwise), or if it is not compatible.
It is an Epicor Rest library he created that facilitates Epicor’s rest functionality. Makes it easy to use Epicor’s rest functionality. Its called EpicorRestAPI. I downloaded it from within VS from the Nuget manager.
What the error is saying is that our helper Dll is not strongly signed (it isn’t) but Epicor wants it to be (that shouldn’t be the case) so I suspect there’s something weird with your setup
Maybe the consultant strongly signed his external DLL?
Either way the setup doesn’t make a lot of sense calling an Epicor Rest endpoint from a BPM is like going around the world 3 times to cross the street
BPM happens server side you are already as close to the server / BO as you can be take advantage of that use Db context
Yes I believe you are right. I think our custom dlls are strongly signed which is causing this error. I was trying to test the functionality of the rest call with a BPM to see how it worked cause i saw your video online and got curious. I see your point that if I am using a BPM to do that i might as well use the BO to call the BAQ (which I will most likely do or use an Epicor function).
I am going to try the BO method. Thanks for the insight.