3

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.

1 Answer 1

7

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

Sign up to request clarification or add additional context in comments.

2 Comments

I thought I had the audience set, but after playing around with different settings, it started working. I feel like I also had to hit refresh on the PO page too. Anyway it working now thank you for the feedback.
How to set the script deployment's Audience docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.