Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
758 views
in Technique[技术] by (71.8m points)

acumatica - How can I move the Add Email (NewMailActivity) action on PO301000 into the Actions menu?

I wanted to enable the Add Email button on the POOrderEntry screen (PO301000) and place it under the Actions menu so that it physically looks like the same action on ARInvoiceEntry (SO301000).

I have tried making a graph extension but NewMailActivity is not part of the defined actions in the graph.

  public class POOrderEntry_Extension : PXGraphExtension<POOrderEntry>
  {
    public override void Initialize()
    {
        base.Initialize();
        Base.Actions.Move(nameof(Base.Actions.NewMailActivity), "Email Purchase Order", true);
    }
  }

I have also tried:

        Base.Actions.Move("Add Email", "Email Purchase Order", true);

to no avail. There's no error but nothing changes.

How can I move that PXAction into the Actions menu?

question from:https://stackoverflow.com/questions/65865901/how-can-i-move-the-add-email-newmailactivity-action-on-po301000-into-the-actio

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In the initialize method you can do:

Base.action.AddMenuAction(<your action>)

This should add your action button to the actions dropdown.

Also if you want to define your own action dropdown in a graph you only need to do the following:

    PXAction<PrimaryDAC> action;
    [PXButton(MenuAutoOpen = true)]
    [PXUIField(DisplayName = "Action Dropdown", MapViewRights = PXCacheRights.Select,
        MapEnableRights = PXCacheRights.Select)]
    protected virtual void Action() { }

The MenuAutoOpen property being the key here. Then you can use the same method as stated above to add actions to the action dropdown.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...