Skip to main content
Solved

CacheAttached application order within a single customization


Shawn Burt
Jr Varsity I
Forum|alt.badge.img+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.

Best answer by Shawn Burt

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.

View original
Did this topic help you find an answer to your question?

6 replies

Nayan Mansinha
Community Manager
Forum|alt.badge.img+2
  • Acumatica Developer Support
  • 49 replies
  • September 27, 2022
Shawn Burt wrote:

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>
{
...
}

 


Shawn Burt
Jr Varsity I
Forum|alt.badge.img+1
  • Author
  • Jr Varsity I
  • 109 replies
  • September 28, 2022

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.


Shawn Burt
Jr Varsity I
Forum|alt.badge.img+1
  • Author
  • Jr Varsity I
  • 109 replies
  • September 28, 2022

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 


Nayan Mansinha
Community Manager
Forum|alt.badge.img+2
  • Acumatica Developer Support
  • 49 replies
  • October 4, 2022
Shawn Burt wrote:

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.

 

Shawn Burt wrote:

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.


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2664 replies
  • November 21, 2022

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


Shawn Burt
Jr Varsity I
Forum|alt.badge.img+1
  • Author
  • Jr Varsity I
  • 109 replies
  • Answer
  • November 21, 2022

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings