You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Acumatica自定义DAC(EAAsset)中启用并配置自动化通知?

Got it, let's walk through exactly how to get those standard automation notification buttons working on your custom EAAsset DAC and AssetEntry graph. I’ve done this dozens of times for custom entities, so here’s the no-nonsense step-by-step breakdown:

Step 1: Prep Your Custom DAC & Graph for Notifications

First, you need to make sure your DAC and graph support Acumatica’s notification infrastructure:

  • Add a NoteID field to your EAAsset DAC: The notification system relies on the Note framework to track related notifications. Add this field if you haven’t already:
    public abstract class noteID : IBqlField { }
    [PXNote]
    public virtual Guid? NoteID { get; set; }
    
  • Update your AssetEntry graph inheritance: Change your graph to inherit from PXGraphWithNotification<TGraph, TDac> instead of the base PXGraph class. This gives it built-in notification support:
    public class AssetEntry : PXGraphWithNotification<AssetEntry, EAAsset>
    {
        // Your existing graph code here
    }
    
Step 2: Add the Standard Notification Button to Your Page

You have two easy ways to add the standard notification button to your AssetEntry page:

Open your AssetEntry.aspx file, find the ActionBar section, and add the PXNotificationsMenu control—this automatically renders the full notification dropdown (View Notifications, Send Notification, etc.):

<px:PXActionBar runat="server" ID="ActionBar">
    <!-- Your existing toolbar buttons here -->
    <px:PXNotificationsMenu runat="server" ID="btnNotifications" />
</px:PXActionBar>

Option 2: Code-Based Button

If you prefer adding it via C# (for dynamic scenarios), add this to your graph’s constructor:

public AssetEntry()
{
    this.Toolbar.AddButton(new PXToolBarButton
    {
        Text = "Notifications",
        Command = "Notifications",
        Key = "Notification",
        Visible = true
    });
}
Step 3: Configure Automation Notification Templates for Your DAC

Now you need to set up notification templates tied to your EAAsset entity:

  1. Navigate to System > Management > Automation Notifications in Acumatica.
  2. Click Add to create a new template:
    • Source Type: Select your EAAsset DAC (it should appear in the dropdown if your custom project is deployed correctly).
    • Template ID/Description: Fill in a unique ID and friendly description.
    • Trigger Conditions: Define when the notification should send (e.g., when EAAsset.Status changes to "Disposed").
    • Recipients: Choose roles, specific users, or map to a field on your DAC (like an OwnerID field if you have one).
    • Message: Use placeholder values (e.g., [EAAsset.AssetID], [EAAsset.Description]) to pull dynamic data from your DAC.
  3. Check the Active box and save the template.
Step 4: Test & Validate
  • Open your AssetEntry page, load an EAAsset record—you should see the notification button in the toolbar.
  • Click the button to access:
    • View Notifications: See all sent/queued notifications for the record.
    • Send Notification: Manually trigger a notification using your template.
  • Verify automated triggers: Update the EAAsset record to meet your template’s conditions, then check the System > Management > Notifications Log to confirm the notification was sent.
Quick Troubleshooting Tips
  • If your DAC doesn’t appear in the Source Type dropdown: Ensure your DAC has the [PXCacheName("Friendly Asset Name")] attribute for visibility, and confirm your custom project is published.
  • If the button doesn’t show up: Double-check your graph inheritance and ASPX control placement.
  • If placeholders don’t populate: Make sure your DAC fields have the [PXUIField(DisplayName="Field Name")] attribute.

内容的提问来源于stack exchange,提问作者user3857731

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 03:25:56