Solved

CacheAttached application order within a single customization

  • 10 August 2022
  • 6 replies
  • 78 views

Userlevel 5
Badge +1

I have a customization that has CacheAttached for PMInstanceID for SOOrderEntry that is overridden in two different areas.

Is there a way to control the order these apply? e.g. I need them to apply in a specific order or it doesn’t work correctly as the merge removes some attributes.

icon

Best answer by Shawn Burt 22 November 2022, 00:24

View original

6 replies

Userlevel 4
Badge +2

I have a customization that has CacheAttached for PMInstanceID for SOOrderEntry that is overridden in two different areas.

Can you clarify as to what are these two different areas?  Is that there is  (a) DAC extension and graph extension that override this field?  Or (b) there 2 different graph extensions of SOOrderEntry that override this field?   In case of (a), graph extension takes precedence, and in case of (b), one must use second level of extension to control the order. i.e.

public class MyExtension2 : PXGraphExtension<MyExtension1, SOOrderEntry>
{
...
}

 

Userlevel 5
Badge +1

I have two features and by proxy two graph extensions. I was wondering if both graph extensions are active and both implement CacheAttached on PMInstnaceID what determines the “winner”?

 

FYI I modified my IsActive so if both were enabled only one of the them was actually activated, so I have resolved my dilemma. That being said it would be nice to know if there is a way to control “level” within a single customization.

Userlevel 5
Badge +1

I just reread your solution and this issue is they are separate graph exts as they are separate features. So I can enable either one at a time or both at once, if I make one an extension of the other then there is no way to enable independently 

Userlevel 4
Badge +2

I have two features and by proxy two graph extensions. I was wondering if both graph extensions are active and both implement CacheAttached on PMInstnaceID what determines the “winner”?

From previous example, MyExtension2 will be the winner.

 

I just reread your solution and this issue is they are separate graph exts as they are separate features. So I can enable either one at a time or both at once, if I make one an extension of the other then there is no way to enable independently 

Yes, in that case have them independent of each other - as you have them now.

Userlevel 7
Badge

Hi @Shawn Burt - were you able to find a solution? Thank you!

Userlevel 5
Badge +1

my solution was to create additional graph extensions with different IsActive methods that allow me to determine what features are active and so I have a one with feature 1 enabled and another with Feature 2 and another with both. that way I can control the behavior. Not elegant but it works.

Upon further investigation it seems that the graph exts are sorted by name so I should be able to name them in the order I want them to fire but I have not gone back and confirmed.

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 — 2024  Acumatica, Inc. All rights reserved