I am trying to add the stdcost from Partcost onto the the PO Detail table or the PO > Release> detail menu item so I can use that to signal the buyer if they are buying a part for greater then the std cost, the only problem is, I am not able find a way to bring that field in. I have tried Data Tools, but have not been successful, I have also tried the PartCostSearchAdapter, but it says I am not using the ERP.Adapters, which is in the custom script by default. Any help is appreciated.
Have you already looked at using a BAQ and DynamicQuery?
If not, I think you can search this site and find a lot of good examples.
or the Epicor ICE Tools User Guide shows some info too
I have learned how to use a BAQ to pull in that field. I have the code below and I want the Part Number on the PO detail table to be the param for the query, which is pulling in a calc field, but I am not sure how to go about that.
private void txtPart_Leave(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **
DynamicQueryAdapter dqa = new DynamicQueryAdapter(oTrans);
dqa.BOConnect();
QueryExecutionDataSet qeds =
dqa.GetQueryExecutionParametersByID(“PartCostStdCost”);
qeds.ExecutionParameter.Clear();
qeds.ExecutionParameter.AddExecutionParameterRow("PartParam", partCost.Value, "nvarchar",false, Guid.NewGuid(),"A");
dqa.ExecuteByID("PartCostStdCost", qeds);
var PartForCost = dqa.QueryResults.Tables["Results"].ToString();
}