(Aaron Willett) #1

How do I figure out what the system is looking for when using ProcessCaller and LaunchFormOptions for the Pro Forma Invoice? Or any process, for that matter.

(Jose C Gomez) #2

You can reflect into it…
Looks like it’s looking for a LFO.ValueIn = YourOrderNumber

(Aaron Willett) #3

You can reflect into it…


(Jose C Gomez) #4

Sorry .NET Reflection

You can use a program like .Net Reflector to see what epicor expects and view (some of) the Epicor Code. For example for the pro-forma invoice. Epicor has this function on Form Loaded

it looks for if LaunchFormOpts is a ReportArgs
If not, then it looks for LaunchFormOpts.ValueIn being an order numer

(Aaron Willett) #5

When I click on the new Pro Forma menu, it explodes Epicor. I get the “Trying to Reconnect” and all the screens go white. When I close the white pro forma window, it reconnects and gives me an object ref error.
Am I missing a step?

public void proFormaTool_Click(object sender, EventArgs args)
	EpiDataView edv = ((EpiDataView)oTrans.EpiDataViews["OrderHed"]);

	LaunchFormOptions lfo = new LaunchFormOptions();
	lfo.ValueIn = Convert.ToInt32(edv.dataView.Table.Rows[0]["OrderNum"]);;

	ProcessCaller.LaunchForm(oTrans,"UDCSG009", lfo);

(Jose C Gomez) #6

Only issue could be that it is looking for this.Trans.ReportParamView.HasRow… if that’s not true then maybe it is not executing…hmm

(Aaron Willett) #7

So, I got it, but I don’t know why it works.
“UDCSG009” refers to DotNetIT’s Doc Sender customization menu, which is what I was originally calling with ProcessCaller.
I created a new process for pro forma in Menu Maintenance, gave it a new Menu ID, and assigned the customization to the DNI (Base Ext) and called that new Menu ID with ProcessCaller and suddenly it works.

(Jose C Gomez) #8

ah! the document sender customization probably uses the ValueIn or the LFO object.