NetSuite TOP TIPS Technology: SuiteScript Limitations

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u012025054/article/details/83444756

Customization Through SuiteScript

  • SuiteScript is a JavaScript-based API that eanables developers to extend NetSuite beyond the capabilities provided through SuiteBuilder point-and-click customization.
  • SuiteScript allows user to :
    • Perform custom business processing when NetSuite records are viewed, updated, created, or deleted.
    • Perform custom validations and calculations in the browser client.
    • Created custom user interfaces.
    • Run batch processes.
    • Perform various utility processing, such as sending emails and faxes or creating and uploading files.
    • Create custom dashboard portlets.
  • NetSuite does have some technical limitations with the use of SuiteScript.

SuiteScript Metering

The following table identifies the allowed metering limit for the different script types:

SuiteScript Metering
Script Type

Total Units Allowed

Per Script

Scheduled Scripts 10,000
User Event Scripts 1,000
Client Scripts 1,000
Suitelets 1,000
RESTlets 5,000
Portlet Scripts 1,000
Mass Update Scripts 1,000
Bundle Installation Scripts 10,000
Workflow Action Scripts 1,000

Overcoming Metering Limitations

  • Developers should be aware of the cost of each type of function they want to use and determine if there is a more cost-effective alternative.
  • Scheduled scripts include code to check the remaining meter usage and reschedule the script if nearing the limit
if (ctx.getRemainingUsage() <= 1000)
{
    try
    {
        throw "ignoreme";
    } catch(noop)
    {
    }
    nlapiYieldScript();
}

SuiteCloud Plus

  • NetSuite provides a single queue for running scheduled scripts
  • Scheduling multiple scripts results in:
    • Bottlenecking
    • Decreased performance
    • Increased long script execution time
  • With the purchase of a SuiteCloud Plus license, companies can upgrade the number of scheduled script queues from one to five.
  • SuiteCloud Plus can enhance performance by:
    • Increasing the number of threads available for Web services through support of a concurrent Web services user.
    • Increasing the number of queues available for scheduled scripts.
    • Increasing the number of queues and threads available for CSV import jobs.
SuiteCloud Plus
SuiteCLoud Plus Licenses Concurrent Web Services Users Scheduled Script Queues CSV Import Queues/Threads Per Job
1 1(10 threads) 5 5 Queues/2 Threads
2 2(20 threads) 10 5 Queues/5 Threads
3 3(30 threads) 15 5 Queues/10 Threads

Using SuiteCloud Plus

  • Queue dropdown field is added to the Script Deployment record for scheduled scripts
  • The script author or administrator can use this field to set the target queue of a script

Tip: To process the same script concurrently, create multiple deployments for the same script and then set each deployment to a different queue.

猜你喜欢

转载自blog.csdn.net/u012025054/article/details/83444756
top