Our Supplier Tracker customization added a “closed purchase orders” UltraGrid (populated via a BAQ). The first column is “POHeader.PONum” and we would like to “right click, open purchase order”.
I currently don’t have any right-click ability on this column. Also, I can’t seem to make anything work through the Context Menu Maintenance area. Is there somewhere else I need to go to make this work?
I believe you need to make sure your like field is populated in the extended properties. Note that open with context does not work with external BAQs in E9, not sure in E10, but if what Ken says you may be able to get external BAQs to open with if you used the code.
We’re still in E9 and here’s what I use to accomplish your challenge.
This example populates an ultragrid from a BAQ then sets the “Like” attribute on the appropriate column of the BAQResult table - which, I assume, is the source of your ultragrid.
public void InitializeCustomCode()
{
// ** Wizard Insert Location - Do not delete ‘Begin/End Wizard Added Variable Initialization’ lines **
// Begin Wizard Added Variable Initialization
// End Wizard Added Variable Initialization
// Begin Wizard Added Custom Method Calls
// End Wizard Added Custom Method Calls
this.ordStuffDS = this.ordStuffQuery.GetByID("UTIL-OrdStuff");
this.openOrders = this.ordStuffQuery.Execute(this.ordStuffDS).Tables["Results"];
this.edvBAQResult = new EpiDataView(); // This is the dataview Ken referred to...
this.edvBAQResult.dataView = this.openOrders.DefaultView;
this.oTrans.Add("BAQResults", this.edvBAQResult);
this.edvBAQResult.dataView.Table.Columns["OrderHed.OrderNum"].ExtendedProperties["Like"] = "OrderHed.OrderNum";
this.edvBAQResult.dataView.Table.Columns["Customer.CustID"].ExtendedProperties["Like"] = "Customer.CustID";
this.edvBAQResult.dataView.Table.Columns["OrderDtl.Partnum"].ExtendedProperties["Like"] = "Part.PartNum";
this.edvBAQResult.dataView.Table.Columns["ShipHead.PackNum"].ExtendedProperties["Like"] = "ShipHead.PackNum";