On my project (job) records, I want to untick 'Lim...
# ask-stanley-ai
a
On my project (job) records, I want to untick 'Limit Time and Expenses To Resources' for all my projects. Is there a preference in the system that ensures this is unchecked when new records are created?
c
AI generated answer (using internal Slack threads):
In NetSuite, there isn't a system preference that ensures the 'Limit Time and Expenses To Resources' checkbox is unchecked when new project records are created. This checkbox is typically controlled on a per-record basis. However, you can automate the process of unchecking this box for all your projects using SuiteScript. You can write a script that iterates over all your project records and sets the 'Limit Time and Expenses To Resources' field to false. Here's a simple example of how you might do this using SuiteScript 2.0:
Copy code
javascript
require(['N/record', 'N/search'], function(record, search) {
    var projectSearch = search.create({
        type: search.Type.JOB,
        filters: [],
        columns: ['internalid']
    });

    projectSearch.run().each(function(result) {
        var projectId = result.getValue({name: 'internalid'});
        record.submitFields({
            type: record.Type.JOB,
            id: projectId,
            values: {
                custentity_limit_time_exp_to_res: false
            },
            options: {
                enableSourcing: false,
                ignoreMandatoryFields : true
            }
        });
        return true;
    });
});
Please replace 'custentity_limit_time_exp_to_res' with the actual field id of 'Limit Time and Expenses To Resources' in your account. ****** 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.880334
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.860816
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.84087956
Please provide your feedback on this answer.