Hi everyone,
Good day to all, i am trying to set a default value in financial report version table the retentionExpirationDate field to max date which will show in the frontend form as "Never".
My code in financialreportVersion table extension:
Class extension on FinancialReportingGenerateController. When generate button is clicked this class will be called.
after generating the report I am able to see the expiration date being overwritten as "Never" but as i refresh the value changes back to 90 days instead of Never. I am unable to find what is overwriting the value. Would like to seek help on this issue. Thank you so much.
If it is displaying as Never then inserted correctly but some process must be updating it. Can you find reference on RetentionExpirationDate field and see if there is any other customization. Also put breakpoint on both methods in the below screenshot and check if it gets called when you click another financial report. (If it still refer to the original report where you changed to Never).
Yes thank you so much, my Screenshot on the discussion is the COC that i have done on execute method.
I have tried the event handlers on the form onupdating/oninserting/oninitialising and also table event handler onmodified but doesn't seem to hit the breakpoint when I debug.
Exactly, you should try COC on execute as it has public modifier. That should work.
Also if coc doesn't work try event handler related to insert and update.
Hi Bharani Preetham,
Thank you for the suggestion, but I am only able to COC in execute method as other methods are private and unable to do so.
I would suggest you to write this update or insert logic where the system is actually changing these values post next statement. For example in the updateReportVersionTable().
Hi Rampal,
I did a Coc on insert and update on the class.
when i generate the report it shows "Never" but whenever i click another financial report and go back to the current report i generated. The "expire after" field changes to 90 days expiration instead of "Never".
You can create extension class and CoC on insert and update method, check if value is inserting correctly in insert and if update method is called you can check table buffer and call stack.
Hi Bharani Preetham,
Thank you so much for you response, I have checked modified field/methods in the form there is no methods found.
The execute standard method insert the record to financialreportVersion table, i have debug this and i can see my overwritten expiration date being updated correctly.
Have you checked about modified field or modified methods? Also what did you find in execute query()?
Hi Rampal,
Thank you so much for your response, the table doesn't have any standard method. I also did a find reference to see if there is any customization or updating code to overwritten but couldn't find any.
André Arnaud de Cal...
291,971
Super User 2025 Season 1
Martin Dráb
230,846
Most Valuable Professional
nmaenpaa
101,156