Playing Catch with Epicor Forms

Hello, what I’m trying to achieve is relatively simple but I keep hitting roadblocks. Long story short, i want to open a screen (child screen) with a button click in Order Entry (parent screen). After filling some things out on the child screen, and clicking OK (or some other btn event) I want to pass values from what’s filled out on the child screen back to the parent screen. I can open the child screen just fine, it’s just passing values back to the parent form is where I’m struggling. Is there someone that’s done this before? If so, what methodology did you use? I understand there’s BPM Data Forms, but the child screen I’m building is quite complex and I’m afraid it’s beyond the Data Forms capability. I’m hoping there’s a method out there within the Forms that’s built for this.

Have a good one!

Check out callbacks:

5 Likes

This code goes in the parent form:

		LaunchFormOptions lfOpts = new LaunchFormOptions();
		lfOpts.ValueIn = "any value you want to pass to child form";
		lfOpts.SuppressFormSearch = true;
		lfOpts.IsModal = true;
		string childFormReturn = (string)ProcessCaller.LaunchForm(oTrans, "Ice.UI.UD02Entry.dll", lfOpts);

This code goes in the child form:
//returns a value to the first form
private void btnCancel_Click(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **

	string _result = "this is my result back to the parent form";
	typeof(Ice.Lib.Framework.EpiBaseForm).InvokeMember("ReturnObject", BindingFlags.Instance | BindingFlags.SetProperty | BindingFlags.NonPublic | BindingFlags.Public, null, UD01Form, new object[] {_result});

}
1 Like