This is a duplicate of another topic, but the solution on that topic is not working for me.
I have a custom action to open a popup to change the Location ID on the Customer screen, location tab.
I have a working popup on the main toolbar.


I want to have this action on the Locations Grid menu. I cannot get it to show.

In the classic screen, the action shows up nicely.
This code works for showing the action on the main toolbar:
import {
PXFieldState,
PXView,
viewInfo,
createSingle,
gridConfig,
PXActionState,
} from "client-controls";
import { AR303000 } from "src/screens/AR/AR303000/AR303000";
export interface AR303000_AgroShip_converted extends AR303000 { }
//action that is showing on the main toolbar.
export class AR303000_AgroShip_converted {
@viewInfo({ containerName: "Change Location ID" })
ICSChangeLocationIDValueView = createSingle(ICSChangeLocationIDValue);
}
export interface AR303000_Location_AgroShip_converted extends Location { }
@gridConfig({
topBarItems: {
AddNew: { index: 0, config: { commandName: "ChangeLocationID", text: "Change Location ID" } }
}
})
//Adds the field to the popup
export class ICSChangeLocationIDValue extends PXView {
UsrNewLocationID: PXFieldState;
}In this code, I tried to add the action to the grid which is not working:
import {
PXFieldState,
PXView,
viewInfo,
createSingle,
gridConfig,
PXActionState,
} from "client-controls";
import { AR303000 } from "src/screens/AR/AR303000/AR303000";
export interface AR303000_AgroShip_converted extends AR303000 { }
//action that is showing on the main toolbar.
export class AR303000_AgroShip_converted {
@viewInfo({ containerName: "Change Location ID" })
ICSChangeLocationIDValueView = createSingle(ICSChangeLocationIDValue);
}
//Attempt to add the button to the grid
export interface AR303000_Location_AgroShip_converted extends Location { }
export class AR303000_Location_AgroShip_converted {
ChangeLocationID: PXActionState;
}
@gridConfig({
topBarItems: {
AddNew: { index: 0, config: { commandName: "ChangeLocationID", text: "Change Location ID" } }
}
})
//Adds the field to the popup
export class ICSChangeLocationIDValue extends PXView {
UsrNewLocationID: PXFieldState;
}What am I doing wrong??



