How do you pass a field value to a report form on button click

Hey everyone,

I’ve created a customization the AR Invoice Entry form with a button that will launch a custom BAQ report form and pass values to it.
I’ve also created a customization on the custom BAQ report form to take those values and populate the report parameters with them.

This is working great if I hard code the data in the script, but I cannot figure out how to make it actually use the data directly from the AR Invoice Group.

I was able to piece together the below script using other topics on here. This works and passes the text “GroupID” to the report form.

How do I make it pass the actual GroupID that the user currently has open?
I’ve tried using InvcGrp.GroupID but the code doesn’t compile when I try that.

private void epiButtonC1_Click(object sender, System.EventArgs args)
	{
		// ** Place Event Handling Code Here **
	

	LaunchFormOptions lfo = new LaunchFormOptions();
	lfo.IsModal = false;
	lfo.ValueIn = ("GroupID" + "~" + "false" + "~" + "");
	ProcessCaller.LaunchForm(oTrans, "ARINVCE", lfo);

	}

Can’t you access the EpiDataViews using the oTrans object? For example the oTrans.invcHeadView

Thanks Jonathan. I’ve only used customizations to add fields to forms in the past. This was the first time I needed to actually add some custom code, so I had never heard of using oTrans. oTrans.GroupID is what I needed.

That was a question to you as much as it was for me, trust me. I rarely work with customization so I’m not sure how everything works together. Glad it helped.