Hi @mchaturvedi57,
You can create an unbound field in the Header DAC and in the graph extension in the RowSelected or FieldSelecting event you can assign the value to the unbound DAC.
Now you can use the Unbound field created as the parameter. Below is an example, I have for the Sales Order screens,
public class SOOrderExt : PXCacheExtension<PX.Objects.SO.SOOrder>
{
#region UsrCurrentInventoryID
[PXString(50)]
[PXUIField(DisplayName="CurrentInventoryID")]
public virtual string UsrCurrentInventoryID { get; set; }
public abstract class usrCurrentInventoryID : PX.Data.BQL.BqlString.Field<usrCurrentInventoryID> { }
#endregion
}
public class SOOrderEntry_Extension : PXGraphExtension<PX.Objects.SO.SOOrderEntry>
{
#region Event Handlers
protected void SOLine_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected baseHandler)
{
baseHandler?.Invoke(cache, e);
var row = (SOLine)e.Row;
if (row == null) return;
SOOrderExt orderExt = Base.Document.Current.GetExtension<SOOrderExt>();
if (row.InventoryID == null) return;
InventoryItem currentItem = PXSelect<InventoryItem,
Where<InventoryItem.inventoryID, Equal<Required<InventoryItem.inventoryID>>>>.Select(Base, row.InventoryID);
orderExt.UsrCurrentInventoryID = currentItem.InventoryCD;
}
protected void SOLine_InventoryID_FieldSelecting(PXCache cache, PXFieldSelectingEventArgs e, PXFieldSelecting baseHandler)
{
baseHandler?.Invoke(cache, e);
var row = (SOLine)e.Row;
if (row == null) return;
SOOrderExt orderExt = Base.Document.Current.GetExtension<SOOrderExt>();
if (row.InventoryID == null) return;
InventoryItem currentItem = PXSelect<InventoryItem,
Where<InventoryItem.inventoryID, Equal<Required<InventoryItem.inventoryID>>>>.Select(Base, row.InventoryID);
orderExt.UsrCurrentInventoryID = currentItem.InventoryCD;
}
#endregion
}
Above will help you set the parameter and open the side panel as required. Unfortunately, as of now the side panel cannot be refreshed from the graph. So if the user selects and different detail lines, the side panel cannot be refreshed to show the right information.
Feel free to post back if you have any questions.!