Stumped
Stumped

Reputation: 21

Disable actions in the Actions menu on the Purchase Order screen

I need to disable and enable the highlighted actions inside the action menu on the Purchase Orders screen, I have tried using

`Base.Actions["complete"].SetEnabled(false);` and `Base.complete.SetVisible(false);`

but that does not work.

enter image description here

Any help would be appreciated.

Upvotes: 0

Views: 292

Answers (1)

Brian Stevens
Brian Stevens

Reputation: 1941

The Purchase Orders screen uses the POOrderEntry graph. You will want to override the POOrder RowSelected event. Next, you want to use SetEnabled and SetVisible on the complete action directly.

#region POOrder_RowSelected
protected virtual void POOrder_RowSelected(PXCache sender, PXRowSelectedEventArgs e, PXRowSelected baseEvent)
{
    baseEvent(sender, e);

    Base.complete.SetEnabled(false);
    Base.complete.SetVisible(false);

}
#endregion

Upvotes: 1

Related Questions