Reputation: 755
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
}
}
);
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.
Upvotes: 3
Views: 675
Reputation: 15462
When you deploy a script you generally need to set the Audience. Otherwise you get what you have just observed.
Upvotes: 7