I’ve converted a custom screen with a couple of grids. There is a parent-detail relationship with the grid.
I have an action button that will print a report and the underlying code will pass values from the current highlighted detail line grid.
In Classic UI it works. In Modern UI it doesn’t.
The action code is as follows:
public PXAction<NLABCBulkHeader> PrintSerialReport;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Packing List", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
public virtual IEnumerable printSerialReport(PXAdapter adapter)
{
NLABCBulkHeader row = this.Header.Current;
NLABCBulkDetail line = this.Details.Current;
PXBaseRedirectException.WindowMode windowMode = PXBaseRedirectException.WindowMode.NewWindow;
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters["OrderNbr"] = row.OrderNbr;
parameters["FromPallet"] = line.PalletNumber;
parameters["ToPallet"] = line.PalletNumber;
var reportRedirectionException = new PXReportRequiredException(parameters, "SO6420ZY", windowMode, "Packing List");
throw reportRedirectionException;
}In Modern UI, this.Details.Current is null. this.Header.Current does have a value.
My grid decorator in the .ts file is:
@gridConfig({
syncPosition: true,
allowInsert: false,
showFastFilter: GridFastFilterVisibility.False,
preset: GridPreset.ReadOnly,
})Is there another gridConfig parameter that I need to include to keep .Current up to date based on the user moving around in the grid like Classic UI does?