function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PARISE RAVIKIRANPARISE RAVIKIRAN 

I need solutions for this problem and wow to approach

The above fields must be updated every time when any of the actions mentioned in the below document has been performed on either Account Plan or a related record:
1.Last Updated Date/Time: When the event/action has taken place
2.Last Updated By: User who performed the action
3.Last Updated Section: Which component of the account plan has been updated (refer to the below document for the Account Plan Section details)
 
Account Plan SectionFieldAction 
Account Profile - OutlineAccount Plan NameEdited
Account Profile - OutlinePrimary IndustriesEdited
Account Profile - OutlineWhat do they offer?Edited
Account Profile - OutlineWho are their customers?Edited
Account Profile - OutlineAnnual RevenueEdited
   
   
  Edited
These above are data when ever a field is updated or inserted these  fields should display
1.Last Updated Date/Time: When the event/action has taken place
2.Last Updated By: User who performed the action
3.Last Updated Section: Which component of the account plan has been updated (refer to the below document for the Account Plan Section details)  and in this Last Updated Section: it should display last Last Updated Section name.
give me best solutions.
Nancy thomasNancy thomas

To achieve the desired functionality of updating the "Last Updated Date/Time," "Last Updated By," and "Last Updated Section" for the fields in your Account Plan, you'll need to implement some custom logic within your system. Here's a general solution using a database and code to keep track of these changes:
Database Schema: You should have a database table to store the Account Plan information. In this table, you can include the following columns:
Account Plan ID
Account Plan Name
Primary Industries
What do they offer?
Who are their customers?
Annual Revenue
Last Updated Date/Time
Last Updated By
Last Updated Section
Logging Mechanism: Create a logging mechanism or history table to track changes. Whenever any of the fields are updated, a new record should be inserted into the history table with the following information:
Account Plan ID (to link the change to a specific plan)
Field Name (e.g., "Account Plan Name," "Primary Industries," etc.)
New Field Value
Last Updated Date/Time (the time of the change)
Last Updated By (the user who performed the action)
Last Updated Section: You can determine the "Last Updated Section" by looking at the field name in the history table for the most recent change related to a specific Account Plan. This information can be dynamically fetched when needed.
Displaying Information: When displaying the Account Plan data, fetch the most recent changes from the history table based on the Account Plan ID. This will allow you to populate the "Last Updated Date/Time," "Last Updated By," and dynamically determine the "Last Updated Section."
Update Trigger: To ensure that these changes are automatically recorded, you might need to implement update triggers in your database or utilize a middleware layer to capture these changes.
User Authentication: Ensure that you have a robust user authentication system in place to identify the user who performed the action.