Why I couldn't find my table in Epi Binding to link the User Define Column to database?

Hi there, I’m new to Epicor 10. Recently I’m doing some customization on inventory transfer. The customization I did is to add a ProjectID column into inventory transfer. After when I want to use Epi Binding to link the UD field with the PartTran, I couldn’t find partTran in the Epi Binding field.
Do you guys have any solution for it?


The Table is already synchronized

So taking a quick look at the Inventory Transfer screen, the binding on most fields is to the “view” table. “view” a something that exists within that form, and that form only. So whilst your field is present in the PartTran table, the View isn’t exposing all of the fields from that table. “View” is bringing together data from multiple tables.

You could create a couple of BPMs. CallContextBPMData fields are available to both client UI, and the server.

First - when loading a record, use a BPM to insert data into CallContextBPMData.Character01
Second - when saving a record, write the data from CallContextBPMData.Character01 back to PartTran.ProjectID_c.

On the screen, your field binding would be CallContextBPMData.Character01

Hi, Thanks for your response.
I’ve been trying the solutions that you suggested for a few days but I still couldn’t get it. Can you describe more on this?

Sure - I use the following on an “in-trans” directive on the PartTran table. I use it to populate the EmpID field where the system hasn’t seen fit to do so itself:

foreach (var pt in ttPartTran.Where(p=> (p.RowMod == "U" || p.RowMod == "A") && p.EmpID == ""))
{
		if (pt.JobNum != "")
		{
				var lab = Db.LaborDtl.Where(l=> l.Company == callContextClient.CurrentCompany && l.JobNum == pt.JobNum && l.EmployeeNum != "").FirstOrDefault() ;
				if (lab != null)
						pt.EmpID = lab.EmployeeNum ;
		}
}

For your example, you would be saving the info from callcontext back to your custom field:

foreach (var pt in ttPartTran.Where(p=> (p.RowMod == "U" || p.RowMod == "A")))
{
		pt.ProjectID_c = callContextBpmData.Character01;
		
}

The above deals with saving the data away. In terms of retrieving it when loading, for the Qty Adjustment screen you wouldn’t need that I guess because it’s a new record each time.

The only bit that might not be 100% in the code above is the reference to the custom field. @josecgomez will the pt.ProjectID_c bit work as it, or does it need slightly different syntax?

For a ttTable you’ll have to use a quoted string to access UD fields

pt["ProjectID_c"]

Or you can use SetUDField()/GetUDField();

1 Like

I’ve successfully bind the field and can be pass the variable into callContextBpmData.Character01.

private EpiDataView edvview;
private EpiDataView edvCallContextBpmData;
// End Wizard Added Module Level Variables **

// Add Custom Module Level Variables Here **

public void InitializeCustomCode()
{
	// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
	// Begin Wizard Added Variable Initialization
	((EpiDataView)oTrans.EpiDataViews["view"]).dataView.Table.Columns.Add("ProjectID", typeof(String));
	this.edvview = ((EpiDataView)(this.oTrans.EpiDataViews["view"]));
	this.edvview.EpiViewNotification += new EpiViewNotification(this.edvview_EpiViewNotification);
	this.edvCallContextBpmData = ((EpiDataView)(this.oTrans.EpiDataViews["CallContextBpmData"]));
	this.edvCallContextBpmData.EpiViewNotification += new EpiViewNotification(this.edvCallContextBpmData_EpiViewNotification);
	// End Wizard Added Variable Initialization

	// Begin Wizard Added Custom Method Calls

	// End Wizard Added Custom Method Calls
}

But I struggle again when comes to retrieving the callContextBpmData.character01 to PartTran.ProjectID_c


Can I know which part I’ve missing or what mistake I’ve done?

Thank You!

I was suggesting using the pre-existing Binding, rather than creating a new column in the view. If you change the binding to be CallContextBpmData.Character01, it will carry that through to the BPM and save the data back into your custom field.