Index of every page on this site: llms.txt
All skills
oracle avatar

/netsuite-sdf-safe-guide

@25488ef
Run it yourself

Comprehensive NetSuite SDF best practices based on the SAFE Guide (12 principles + appendices). Generates Object XML for all 14 script types, enforces governance limits, security patterns, and defensive coding. Includes N/cache, N/query, concurrency limits, OAuth 2.0 guidance, legacy TBA guardrails, CustomTool runtime patterns, REST Web Services (2026.1 features), and 140+ documented pitfalls. Essential for SuiteApp and Account Customization development.

Use this Skill: https://skilld.dev/gh/oracle/netsuite-suitecloud-sdk/netsuite-sdf-safe-guide

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

references09-agreements-licensing.md

≈1.5k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Principle 9: Agreements and Licensing

Source: Oracle NetSuite SAFE Guide (SuiteApp Architectural Fundamentals & Examples) Version 2025.2 Author: Oracle NetSuite

Overview

This principle provides guidance on protecting ownership interest in your SuiteApps and preventing compromise of confidentiality in your products, services, and development efforts.

Key Concepts

Agreement Types

Agreement Type Purpose
Employee/Consultant IP ownership, assignment rights, confidentiality
Customer License Terms for SuiteApp use
Professional Services Implementation services terms
Privacy Policy How customer data is collected and used

Critical Requirements

  1. Right to permit NetSuite - Must have rights to make SuiteApp available through SuiteApp repository
  2. IP assignment - Proper grants of ownership and assignment of intellectual property rights
  3. Confidentiality obligations - Protect products, services, and development efforts
  4. Privacy commitments - Describe how you collect and use customer data

Best Practices

Click-through Agreements

SuiteCloud technologies enable click-through agreements for your SuiteApp:

Bundle Builder > Bundle Properties > Terms of Service:
- Check "Requires Acceptance of Terms"
- Enter license agreement content

Note: For SuiteApp Control Center, click-through functionality is not yet GA.

Protecting Intellectual Property

Code Source Rights
Source Type Considerations
Proprietary code Copyrightable, subject to infringement
Open source code Follow license conditions
Knowledge sharing platforms Usually Creative Commons; short snippets may be fair use
AI/LLM generated code May include proprietary content from training data
Self-generated code Always the safest option
Securing SuiteApp Content

Create InstallationPreferences folder in your SuiteApp project with:

COM.YOURCOMPANY.SUITEAPP/
├── src/
│   ├── FileCabinet/
│   └── InstallationPreferences/
│       ├── hiding.xml      ← Hide server-side scripts
│       ├── locking.xml     ← Lock custom objects
│       └── overwriting.xml
├── Objects/
├── deploy.xml
└── manifest.xml

hiding.xml – Control access to SuiteScript source code.

  • Only use on server-side scripts (client-side must be downloadable by browsers).
  • Prevents view, download, or overwrite of source code.

locking.xml – Prevent modification of custom objects.

  • Cannot hide custom field definitions.
  • Can lock to prevent intentional/unintentional modification.
  • Ensures predictable behavior and backward compatibility.

SDF and Publisher IDs

SDF provides trackability by tagging SuiteApps with Publisher IDs:

// manifest.xml
<manifest projecttype="SUITEAPP">
    <publisherid>com.yourcompany</publisherid>
    <projectid>mysuiteapp</projectid>
    <projectversion>1.0.0</projectversion>
</manifest>
  • Publisher IDs registered by SDN team
  • Only available to SDN partners
  • Provided during onboarding process
  • Can be retroactively registered for existing partners

Deployment Requirements

Important: As of version 2018.1, SDN Partner SuiteApps must be deployed to customer production accounts using:

  • SuiteBundler, or
  • SDF SuiteApp published via SuiteApp Marketplace

Do NOT deploy directly using SDF XML files and SuiteScript source code files.

Code Examples

hiding.xml Structure

<?xml version="1.0" encoding="UTF-8"?>
<hidingpreferences>
    <files>
        <path>/SuiteScripts/ServerModule.js</path>
        <path>/SuiteScripts/ScheduledScript.js</path>
        <path>/SuiteScripts/MapReduceScript.js</path>
    </files>
</hidingpreferences>

locking.xml Structure

<?xml version="1.0" encoding="UTF-8"?>
<lockingpreferences>
    <objects>
        <path>/Objects/customrecord_myrecord.xml</path>
        <path>/Objects/customscript_myscript.xml</path>
    </objects>
</lockingpreferences>

Account Authorization Pattern

/**
 * Implement account authorization to ensure only authorized
 * customers can execute your SuiteApp
 * @NApiVersion 2.1
 */
define(['N/runtime', 'N/https'], (runtime, https) => {
    const AUTHORIZED_ACCOUNTS = ['TSTDRV123456', 'TSTDRV789012'];

    const isAuthorized = () => {
        const accountId = runtime.accountId;
        return AUTHORIZED_ACCOUNTS.includes(accountId);
    };

    const validateLicense = () => {
        if (!isAuthorized()) {
            throw new Error('Account not authorized for this SuiteApp');
        }
    };

    return { isAuthorized, validateLicense };
});

Common Pitfalls

  1. Missing agreements – Jeopardizes ownership interest in SuiteApp.
  2. Hiding client-side scripts – Browsers cannot download hidden scripts.
  3. No account authorization – Allows unauthorized use of your SuiteApp.
  4. Deploying via SDF directly – Use proper distribution channels.
  5. Missing privacy policy – Required for customer agreements.

SuiteBundler Redistribution Risks (Legacy)

Note: SuiteBundler deployment not permitted for new SuiteApps starting in 24.1.

For existing SuiteBundles, mitigate redistribution risks:

  1. Use click-through agreement with appropriate terms.
  2. Enable "Hide in SuiteBundle" for SuiteScript source files.
  3. Name customization objects with company name.
  4. Set "Lock on Install" preferences.
  5. Implement account authorization coding.

Checklist

  • Employee/consultant agreements include IP assignment
  • Confidentiality obligations in place
  • Customer license agreement prepared
  • Privacy policy link included
  • Click-through agreement configured
  • hiding.xml configured for server-side scripts
  • locking.xml configured for custom objects
  • Account authorization implemented
  • Publisher ID properly configured

Further Reading

  • Lockable Custom Objects Supported by SDF in NetSuite Help Center
  • Sample agreements on partner portal
  • SuiteCloud Terms of Service

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts5mo3 checks · Risk SAFE
  • Gen Agent Trust Hub5mo

    This skill is a comprehensive developer guide for NetSuite SuiteCloud Development Framework (SDF), based on Oracle's official SAFE Guide. It provides instructions, XML templates, and architectural patterns for SuiteScript development. The analysis found no malicious patterns, prompt injection attempts, or data exfiltration risks. It correctly promotes security best practices, such as using least-privilege roles and NetSuite's native secrets management.

  • Socket5mo

    No alerts

  • Snyk5mo

    Risk: LOW · No issues

Signed by skilld at 25488ef. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 5 months ago
metadata
{
  "author": "Oracle NetSuite",
  "version": "1.0"
}

README badge

README badge for oracle/netsuite-suitecloud-sdk/netsuite-sdf-safe-guide