Best Practices for SuiteCloud Developer Assistant
The following best practices are intended to help minimize errors and enhance the quality of results you receive from SuiteCloud Developer Assistant. Keep in mind that these best practices may not completely prevent inaccuracies or hallucinations from large language models (LLMs).
Security and Compliance
-
Never share sensitive credentials
Don't include passwords, private keys, internal company details, or other sensitive data in prompts to the SuiteCloud Developer Assistant.
-
Authentication ID management
Store authentication IDs (auth IDs) securely and never share them in chat, code comments, or public repositories.
-
VPN and firewall
Always follow your company's security guidelines when connecting to AI tools.
-
Incident response
Immediately report security incidents, data exposure, or suspected issues using Oracle incident reporting channels.
-
Don't use the Administrator role for automation or integration
Never use the Administrator or any full-privilege role for routine automation, API integration, or tool access. Instead, assign only the minimum privileges required for these tasks. Only grant access to features, integrations, and tools that are necessary for current business or development needs. Regularly review and reduce permissions as applicable.
-
Verify extension versions
Ensure the SuiteCloud Developer Assistant, SuiteCloud, and Cline extensions are up to date and sourced from authorized repositories.
Prompt Quality and Usage
-
Be specific in prompts
Clearly describe what you need (for example, script type, SDF custom object names, and expected error-handling). Specificity improves code quality and accuracy.
-
Iterate on unclear outputs
If generated content isn't accurate, refine your prompt for clarity or context and submit it again.
-
Include project context
Provide context (for example, SuiteCloud Development Framework (SDF) structure) so the assistant can better tailor its responses.
-
Validate generated code
Always review and test code or configuration output before using it in a production environment or sharing with a team.
-
Intended use and limitations
Use the SuiteCloud Developer Assistant feature only for its intended business or development purposes. Don't attempt to use it for any activity that is unethical, illegal, or outside the defined project or organizational scope. Be aware that dangerous or inappropriate prompts are blocked by the system, and there may be usage limits in place to ensure responsible and secure use.
Code and Solution Quality
-
Adhere to best practices
Ensure the generated SuiteScript or SDF XML follows Oracle coding conventions and architectural principles.
-
Unit testing
Test all generated objects, scripts, or changes in a test environment before deploying them to a production environment.
-
Documentation
Accompany generated code with necessary comments and documentation (including how the code works and why it works the way it does).
-
Version control
Commit all generated artifacts to version control systems following organizational branch and environment naming guidelines to avoid accidental overwriting.
-
Ensure careful review before deployment
Never deploy assistant-generated code directly to a production environment. Always review and get code peer-reviewed where possible.
-
Life cycle security
Maintain and update security practices throughout the entire software life cycle, from layout to deployment and maintenance.
-
Logging and traceability
Ensure all automation, integration, and AI tool actions are logged, including who, what, and when, to support traceability and accountability.
Integration and Configuration
-
Auth ID alignment
Create and use appropriate auth IDs for each environment (for example, test, sandbox, and production).
-
Change default ports carefully
When changing ports (to resolve conflicts), communicate with your team and document the new configuration.
-
Monitor service status
Regularly check extension status in Visual Studio Code, check logs for errors, and resolve promptly.
Troubleshooting and Support
-
Use official docs and support
Reference the official documentation in the Help Center for help and updates.
-
Error states
If you encounter an issue, follow the provided troubleshooting steps. Check the extension settings, Cline settings, and NetSuite prerequisites.
-
Feedback mechanism
If you identify bugs, inaccuracies, or missing capabilities, submit feedback as outlined. For more information, see Providing Feedback.
Continuous Learning and Feedback
-
Stay informed
Attend training sessions, read update notes, and participate in feedback cycles as SuiteCloud Developer Assistant evolves.
-
Collaboration
Share your experience and prompt strategies with peers to build a collective knowledge base of effective usage patterns.
-
Review official documentation and release notes
Always consult the latest official documentation and release notes before starting work to ensure you are informed about current features, updates, and important changes.
Unit Testing Best Practices
-
Review and refine generated tests
Always read and understand the generated tests. Update the tests for accuracy and completeness.
-
Validate test coverage
Use code coverage tools to verify that generated tests adequately cover business logic, including edge and error cases.
-
Maintain test readability
Edit automated tests for clear names, structure, and comments. Treat them as you would handwritten tests.
-
Check for sensitive information
Ensure the tool does not insert hardcoded credentials, PII, or confidential business data in any test code, mock or test data.
-
Refine prompts for better results
Provide clear, detailed prompts (including example inputs and outputs, as well as requirements) to help the SuiteCloud Developer Assistant generate higher-quality tests.
-
Keep tests up to date
If production code changes, revisit and regenerate tests as needed, then review changes for correctness.
-
Peer review generated tests
-
Whenever possible, treat AI-generated tests like any other code. Subject them to peer review for correctness and security.
-
Ensure thorough review before deployment
Never use AI-generated tests to validate production deployments without human review.
-
Adhere to Oracle policies
Ensure that your use of the SuiteCloud Developer Assistant complies with Oracle's security, privacy, and compliance guidelines.
Prompt Examples
To get the most out of SuiteCloud Developer Assistant, enter your prompts directly in the Cline chat window within your Visual Studio Code (VS Code) environment.
-
In VS Code, open the Cline panel. You can do this in two ways:
-
Open the Command Palette using Ctrl+Shift+P in Windows or Cmd+Shift+P in macOS and Linux, then type Cline: Jump to Chat Input.
-
Click the Cline icon in the activity bar.
-
-
Type or paste your request in the prompt field. For example, ask Cline to generate SuiteScript code, create SuiteCloud project structures, or explain best practices. The assistant responds inline with generated code or explanations, which you can then review, modify, and insert into your SuiteCloud project.
The following examples illustrate the types of prompts you can use to interact with SuiteCloud Developer Assistant through Cline:
-
I need to create a client script that validates a custom field on Purchase Orders called
custbody_approval_limit(a currency field). The validation should check if the PO total exceeds the employee's approval limit, which is stored incustentity_po_approval_limiton their Employee record. Show me the complete SuiteScript 2.1 client script with proper error handling. -
Create a Map/Reduce script that processes large volumes of sales data to calculate commission splits for multiple sales representatives per transaction. The script should handle complex commission structures based on product categories, customer tiers, and territory assignments. Include detailed reporting and integration with payroll systems.
-
Layout a custom record type for Quality Control Inspections with fields for inspection criteria, test results, inspector assignments, and approval status. Create associated workflows for routing inspections based on item categories, and user event scripts that update item quality ratings. Include the complete SDF structure.
-
I'm building a SuiteCloud project for project management. Create the SDF structure for a custom record called
Project Milestonewith fields for milestone name, due date, completion percentage, assigned resources (employee list), and dependencies (references to other milestones). Include themanifest.xmlfile, custom forms, and a user event script that automatically updates project completion based on milestone progress. -
I need a Suitelet that generates complex manufacturing work orders with multi-level BOM explosions, resource scheduling, and capacity planning. The interface should support drag-and-drop scheduling, visual capacity indicators, and integration with shop floor systems. Include proper validation for resource conflicts and material availability.
-
I've got a SuiteScript 2.1 client script that validates a custom field,
custbody_approval_limit, on Purchase Orders. The validation ensures the PO total does not exceed the employee's approval limit fromcustentity_po_approval_limiton their Employee record. Write comprehensive unit tests for this validation logic, covering scenarios where the PO total is below, equal to, and above the approval limit. Use a standard SuiteScript 2.1 testing framework (such as Jest), and include mock data and expected outcomes for each scenario. -
In SuiteScript 2.1, I often see a comment block at the top of scripts that includes an
@fileannotation. Can you explain the purpose and intended usage of the@fileannotation in SuiteScript files, including any best practices for completing this field? See an example below:/** * @NApiVersion 2.1 * @NScriptType ClientScript * @file po_approval_validation.js * @author Jane Doe * @description Validates Purchase Order approval limits */ -
I have a SuiteScript 2.1 client script function that validates whether the purchase order total exceeds the employee's approval limit. However, when the field
custentity_po_approval_limitis undefined or missing on the Employee record, the script throws an error and the validation fails. Review the following function, identify any issues, and provide a corrected version that safely handles cases where the approval limit is missing or not set, using appropriate error handling and user feedback. Suggest improvements based on SuiteScript 2.1 best practices.function validateApprovalLimit(poTotal, employeeRecord) { var approvalLimit = employeeRecord.getValue({ fieldId: 'custentity_po_approval_limit' }); if (poTotal > approvalLimit) { alert('PO total exceeds the approval limit!'); return false; } return true; }