How to call Function in C#

Directly from WinForms/SmartClient UIs, it seems the answer is no. I haven’t looked into it myself but I also haven’t seen anything to suggest it to be an option and I can’t imagine it being seen as a priority to support.

However, Epicor Functions can easily be called by Kinetic UIs, REST APIs and BPMs (including uBAQ ones) therefore there are lots of ways to still call them usin slight workarounds. What was the purpose that you were hoping to use an Epicor Function for?

Example code for calling a function from a BPM.

string functionLibrary =  "TestLib";
string function =  "TestFunc";
var result = (Tuple<System.Boolean, System.String>)this.InvokeFunction(functionLibrary,function,Tuple.Create(this.ds));
var outputBool = result.Item1;
var outputStr = result.Item2;