Subscribe to Forms DataView

I need to add a grid to the Invoice Entry Screen which will subscribe to the DataView contained in the form already called InvcGrp.GroupID. I’m not sure how I write that column from that Data View. This is what I have so far but it is erroring out saying InvcGrp does not exist in the current context.

private void CreateInvoiceEntryDataView() 
	{
	GS_Invoice_Entry = new BAQDataView("GS_Invoice_Entry");
	oTrans.Add("GS_Invoice_Entry", GS_Invoice_Entry);
	var GroupID = InvcGrp.GroupID;    //THIS IS NOT WORKING RIGHT HERE. HOW DO I REFERENCE DATAVIEW HERE
	oTrans.PublishColumnChange(GroupID, Guid.NewGuid().ToString());
	var GroupIDPub = oTrans.GetPublisher(GroupID);
	GS_Invoice_Entry.SubscribeToPublisher(GroupIDPub.PublishName, "InvcHead_GroupID");
	}	

Screenshot from the Customer Object Explorer Data Object Window on this field:
image

You’re trying to write a variable from a dataview?

var yourVar = edvYourDataView.dataView[edvYourDataView.Row]["YourField"];

The data view I need as the publisher is one built into the invoice entry form by epicor. So I’m not sure how to get ahold of that data view.

You’re trying to get a hold of a field in the InvcGrp dataview?

same code, just reference that view.

EpiDataView edvInvcGrp = (EpiDataView)oTrans.EpiDataViews["InvcGrp"];
var yourVar = edvInvcGrp.dataView[edvInvcGrp.Row]["GroupID"];