Beware removing PXEMailSourceAttribute in 2022R1 (marked Obsolete)

Userlevel 5
Badge +1

You may have noticed when upgrading to 2022 R1 that PXEmailSourceAttribute is now marked Obsolete.


[Obsolete("The Wiki Notifications functionality, which is related to PXEMailSourceAttribute, no longer exists.")]


Trying to remove all those annoying messages during compile and cleanup my custom code to remove the obsolete attribute, I commented out my use of [PXEmailSource] which happens to be defined on every primary DAC used by a graph that has approvals coded and configured.

After removal of the obsolete attribute and rigorous testing of my code, everything seemed ok except for one of several custom screens that implements approvals… until I went to look at Approval Maps and found the Entity Type (EPAssignmentMap.GraphType) drop-down box was blank for my Approval Maps for my custom screens.

As it happens, EPApprovalMapMaint in 2022 R1 still contains the following nugget…

private class Definition : IPrefetchable<EPApprovalMapMaint>
    public List<PXSiteMapNode> SiteMapNodes = new List<PXSiteMapNode>();

    public void Prefetch(EPApprovalMapMaint graph)
        var types = graph.GetGraphTypes(type => type.IsDefined(typeof(PXEMailSourceAttribute), true));
        SiteMapNodes = types
            .Where(x => graph.GetEntityTypeScreens().Contains(x.ScreenID) && graph.IsEpApproval(x))
            .GroupBy(x => x.ScreenID).Select(x => x.First()).ToList();


What this means is that the “obsolete” PXEmailSourceAttribute is not so obsolete… yet.  Upon further investigation, I found that it is used still within standard Acumatica DAC’s, and now we know why.  If you remove the attribute from your primary DAC for screens implementing approvals, this little nugget will remove your ability to create new maps for it.

This cost me a bit more time than I’d like to admit this week when I was researching an approval workflow that broke during my upgrade from 2021 R1 to 2022 R1, so I hope this saves you some time.  As it turns out, the approval workflow needed an extra line of code to explicitly sequence a transition and turned out to be unrelated, but finding this side effect of removing PXEmailSourceAttribute took me down the wrong path for a bit before I found the right solution to my real problem.

Moral of the story, DO NOT REMOVE [PXEmailSource] YET… It isn’t really as obsolete as it looks… yet!

0 replies

Be the first to reply!


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2022  Acumatica, Inc. All rights reserved