So I’m getting an error, which I think is the LaunchForm syntax. I get it whether I hard code an EmpID or use the session EmpID. Here’s the code, and the error is below. Any thoughts?
private void btnLaunchTimeEntry_Click(object sender, System.EventArgs args)
{
string yourEMP = "407"; //((Session)oTrans.Session).EmployeeID;
Hashtable YourHashtable = new Hashtable();
YourHashtable.Add("type","T");
YourHashtable.Add("empID",yourEMP);
YourHashtable.Add("laborDate",DateTime.Now);
LaunchFormOptions lfo = new LaunchFormOptions();
lfo.ValueIn = YourHashtable;
ProcessCaller.LaunchForm(this.oTrans, "UDTimEnt", lfo);
//ProcessCaller.LaunchForm(this.oTrans, "UDTimEnt");
}
Application Error
Exception caught in: Ice.Lib.EpiClientLib
Error Detail
Message: The process caller failed to invoke method LaunchForm in Ice.Lib.App.Launch in Erp.UI.TimeAndExpenseEntry.dll
Inner Exception Message: Exception has been thrown by the target of an invocation.
Program: Ice.Lib.EpiClientLib.dll
Method: InvokeReflectedMethod
Client Stack Trace
at Ice.Lib.Framework.PCallReflector.InvokeReflectedMethod(MethodInfo Method, Object Object, Object MethodParams, String className, String assemblyName)
at Ice.Lib.Framework.PCallReflector.LaunchDotNet(String assemblyName, String className, Hashtable ctorList, String methodName, Hashtable methodList)
Inner Exception
Exception has been thrown by the target of an invocation.
Inner Stack Trace
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object parameters, Object arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture)
at Ice.Lib.Framework.PCallReflector.InvokeReflectedMethod(MethodInfo Method, Object Object, Object MethodParams, String className, String assemblyName)
Inner Exception
Object reference not set to an instance of an object.
Inner Stack Trace
at Erp.UI.App.TimeAndExpenseEntry.TimeExpenseForm.FormLoadFromApprovalEntry()
at Erp.UI.App.TimeAndExpenseEntry.TimeExpenseForm.LaunchForm(Object options)
at Ice.Lib.Framework.EpiBaseForm.ShowFormDialog(Object launchOptions)
at Ice.Lib.Framework.EpiBaseLaunch.LaunchForm(Object LaunchObject)
at Ice.Lib.App.Launch.LaunchForm(Object LaunchObject)