How to add custom field to user notes record?
# ask-stanley-ai
l
How to add custom field to user notes record?
c
AI generated answer (using internal Slack threads):
To add a custom field to a user notes record, you would need to create a custom record that will serve as your own version of user notes. Unfortunately, you cannot directly add a custom field to the system's user notes as they are read-only and are meant to serve as an audit log. Here's a step-by-step guide on how you can create your own version of user notes: 1. Navigate to
Customization > Lists, Records, & Fields > Record Types > New
. 2. Define your custom record. Make sure to enable the
Show Notes
checkbox if you want to include notes. 3. Add the fields you need. You can add as many custom fields as you want. 4. Once you've created your custom record, you can then create a User Event Script that triggers every time a record is edited. This script will create a new instance of your custom record and populate the fields with the necessary information. Here's a sample script:
Copy code
javascript
function afterSubmit(context) {
    var newRecord = context.newRecord;
    var oldRecord = context.oldRecord;

    var customRecord = record.create({
        type: 'customrecord_your_custom_record'
    });

    // Populate your custom fields here
    customRecord.setValue({
        fieldId: 'custrecord_your_custom_field',
        value: 'Your Value'
    });

    var recordId = customRecord.save();
}
Remember to replace
'customrecord_your_custom_record'
and
'custrecord_your_custom_field'
with the actual IDs of your custom record and custom field. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.867756426
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.851603627
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.842003763
Please provide your feedback on this answer.