javascript jQuery(function () { jQuery('.uir-rec...
# ask-stanley-ai
a
javascript jQuery(function () { jQuery('.uir-record-name') .parent() .append( jQuery('<div>', { class: 'uir-record-status', text: 'Custom Status', }) ); }); Turn this into a 2.0 script that mimics a banner like you would see for the status of a transaction record.
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems like you want to create a banner similar to the status of a transaction record in NetSuite using SuiteScript 2.0. You can achieve this by using a User Event script with a beforeLoad handler that leverages the addPageInitMessage() method on the Form. Here is a sample code snippet that you can use as a reference:
Copy code
javascript
/**
 * @NApiVersion 2.x
 * @NScriptType UserEventScript
 * @NModuleScope SameAccount
 */
define(['N/ui/serverWidget'], function(serverWidget) {
    function beforeLoad(context) {
        if (context.type !== context.UserEventType.VIEW)
            return;

        var form = context.form;
        var record = context.newRecord;

        // Add your logic here to get the custom status
        var customStatus = 'Custom Status';

        form.addPageInitMessage({
            type: serverWidget.Message.Type.INFORMATION,
            title: 'Status',
            message: customStatus
        });
    }

    return {
        beforeLoad: beforeLoad
    };
});
This script will add a banner message to the form when it is viewed. The message will display the custom status that you specify. Please note that manipulating the DOM directly (as in the jQuery example you provided) is not officially supported by NetSuite and can lead to issues, especially after updates. It's recommended to use the SuiteScript API whenever possible. ****** 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.882942796
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.857088387
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.842377782
Please provide your feedback on this answer.
a
Within Financial > Lists in the accounting centre, I want to add a custom link into this menu. How? I don't see this lists category to add to