Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netsuite Client Script only Executes in Testing Mode

I have a simple client script that works fine in testing mode. But once I deploy it, it stops executing.

/**
 * @author Patrick 
 * @NApiVersion 2.x 
 * @NScriptType ClientScript
 */
define(['N/ui/message', 'N/record'],
    function(message, record) {

        function pageInit(context) {
            var purchaseOrder = context.currentRecord;
            log.debug(purchaseOrder);

            return true;
        }

        return {
          pageInit: pageInit
        }
    }
);

enter image description here

This deployment works. But once I switch it to deployed it stops working. Any suggestions on what I am missing would be a great help. Thanks.

like image 857
Patrick_Finucane Avatar asked Feb 16 '26 18:02

Patrick_Finucane


1 Answers

When you deploy a script you generally need to set the Audience. Otherwise you get what you have just observed.

like image 66
bknights Avatar answered Feb 19 '26 08:02

bknights



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!