Hi fellow developers. I’ve been doing Acumatica dev since 2019. I am a “lone ranger”, which means I don’t have fellow associates to run things by when I don’t know the best way (or any way) to do a particular “thing”. Thank God for this forum. I’d have quit a long time ago without it.
However, I just finished a project that involved working with Attributes on the Projects screen. I have custom fields on the screen that are Key Performance Indicators and they are calculations based on 3 sources: one of my own custom fields on the PMProject DAC, a field in the Summary tab (PMProjectRevenueTotal DAC), and Attributes in the Attributes tab.
For this one, I have to wait until ALL data has been loaded into the Views. Due to the really unusual way that Attributes are loaded, I cannot use the “appropriate” events to trigger my calculations. Based on my skill set, I can find only one way to do it and it is primarily done in the RowSelected handler, not for the primary DAC on the extension, but the PMProjectRevenueTotal DAC in the summary tab because the RowSelected in the PMProject DAC is loaded before the PMProjectRevenueTotal DAC and it seems to know nothing about that DAC. The PMProjectRevenueTotal DAC is loaded AFTER the PMProject DAC, so I am doing the work there.
My solution feels extremely clunky and I am violating a couple of the Acumatica best practices in order to get it to work.
I host a web site on behalf of a fortune five company that I wrote. It is an ASP.Net site in VB.Net (don’t ask me how I started out on VB instead of C#...it wasn’t my fault). On each page load, there is a “Pre-Prender” event where I can make any final changes to the page. I would give up a kidney to have such an event in Acumatica. In my opinion, there are things you need to do on a graph extension that you simply cannot do the proper way. When I create my own custom graphs, I can follow the best practices because it is MY code.
I am curious and I want to know if any of you are ever in positions where you simply do what you have to do on graph extensions, even if you are breaking rules. I am hoping other have break the rules. It would make me feel less like a bad programmer in Acumatica.