Sunday, 13 October 2024

Document Retention: 6 years is always a solid guess

Overview: Documents need to be retained for specific periods and disposed of at a certain point. 

  1. PAYE Records: 3 years after the end of the tax year to which they relate
  2. Banking records: 6 years
  3. Intellectual Property: 6 years
  4. Donations: 3 or 6 years
  5. Employment Records: Generally, 6 years
  6. Health & Safety Policy: The life of the company and historic versions, previous versions  should be kept for a minimum of ten years
  7. Most other Health and Safety Documents: Retain for 6 years if there are updates.
  8. Accidents and injuries: at least 3 years from the date of reporting
  9. Pension scheme records:  life of Pension scheme +
  10. Hazardous waste: 3 years
  11. Data Protection Act (personal data): Delete as soon as possible
  12. Company Documents

  • Key company documents: Articles of Association, certificate of incorporation, memorandum of association, stakeholder official documents,  ...:  retained for the life of the company. 
  • Directors' contracts & Directors’  qualifying indemnity provisions:  six years after termination or expiry.
  • Annual Budgets, quarterly financial reports, VAT records, Statutory Report and Accounts:  6 years
  • Corporation Tax records: 7 years after filing
  • Contract for purchase of own shares, labour agreements: 10 years from the buying date
  • Property Records: 15 years after expiry
Note: This is my rough guide, as lots of people love talking about Document Retention.

Thursday, 10 October 2024

Network calls intermittently do not occur in Published play mode on a Canvas app

Problem: An app created does not run Patch or any other network call when published and in run mode. The network calls work in edit mode.  Looking at the logs, I identified some users are successfully updating using network calls

Figure 1. Monitoring shows the Edit/Play working and the Publish/Play not making any network calls.

Initial Hypothesis:

The Patch call works in edit mode, and then intermittently, some users get it to work in Published/Play mode.  This tells me the data in the Patch call is causing the network patch call to fail.

Using a Trace and running in play mode, I remove properties until I find the offending property.

Figure 2. In edit mode, a label control, CurrentDateVaue_1.Text is used

Once, we traced the value of CurrentDateValue_1, which is set by the global variable varCurrentDateTime. As this is done on a random screen, if the user does not open the screen in Publish /Play mode, the label control CurrentDateValue_1.Text is never set. 

Resolution: Replace all the code using CurrentDateValue_1.Text with the variable varCurrentDateTime. The label control is not set when the network/patch call is made, and bizarrely, it does not happen. I'd expect it to send regardless and let the error handling catch the issue.