I have a customization on the Opportunities screen that overrides the Persist() method.
Basically the code is iterating the Products.Cache.Cached collection and checking if a particular inventory item is added and also calculating the total amount of the the extended price.
If the item does not exist a new line is added and populated with a calculation using the total.
This is all working very well, but i've noticed an issue where the Products.Cache.Cached collection
contains values from previously loaded records.
For example if I have an opportunity loaded on screen with 3 lines with a total of $500, and I select the add new record toolbar button. Once i enter the required fields on the new record and save. The total of 500 is being pulled from the previous opportunity and my new line is added based on the
total 500 when it should be 0 because no lines have been added to the new opportunity.
Any idea why the cache is not clearing when adding a new record. Any way I can work around it.
Thanks
Scott
Best answer by scottstanaland12
View original