Fetch Active Theme and Extension Files in SuiteCommerce
Fetch active theme and extension files in SuiteCommerce using Gulp commands for local testing and development.
The gulp extension:fetch command is vital for developers working with SuiteCommerce or SuiteCommerce Advanced (SCA). Before deploying or testing an extension locally, you must download the files for the currently active theme. This command retrieves HTML and Sass files for the active theme and any custom extensions that are active. It ensures that the necessary files are present in your local extension workspace, which is crucial for successful local testing and deployment.
Understanding the gulp extension:fetch Command
Running the gulp extension:fetch command does the following:
- Downloads necessary HTML and Sass files for the currently active theme. Do not modify these files, as they are for reference only.
- Downloads files for any custom extensions currently activated.
This command is essential as the developer tools need theme files to compile a local distribution for testing your extension. When you run this command, it will facilitate subsequent testing and deployment processes because it provides the developer tools with the required files.
Important Considerations
- Overwrite Warning: Executing
gulp extension:fetchwill overwrite any existing extension files in your local workspace. Ensure that you've deployed your current work to NetSuite before proceeding to avoid losing any progress. - Published Extensions: Note that the command does not fetch files for published extensions, which are installed as part of a SuiteApp and cannot be edited due to copyright restrictions.
Steps to Fetch Active Files
- In your local development environment, open a command line or terminal and navigate to the top-level extension development directory.
- Run the command:
gulp extension:fetch
- If prompted, provide your Authentication ID, which is utilized for representing your NetSuite account and role. If you’ve previously created an ID, the tools will not prompt for it again.
- To switch accounts, utilize the
--toparameter and create or select a different Authentication ID.
- To switch accounts, utilize the
- Choose your NetSuite account, role, and the specific domain with the active theme or extensions you wish to access.
- Optional: If you have any active extensions for the selected domain, you can download their working files.
The gulp extension:fetch command creates a subdirectory under your Workspace/Extras directory specifically for the fetched theme files. These are strictly for use by developer tools.
Conclusion
By understanding and utilizing the gulp extension:fetch command effectively, developers can streamline the process of extension development within SuiteCommerce. Always ensure that your working files are backed up to prevent loss during the fetching process.
Source: This article is based on Oracle's official NetSuite documentation.
Key Takeaways
- Use the
gulp extension:fetchcommand to download active theme and extension files for SuiteCommerce. - Be cautious of overwriting existing files to avoid losing unsaved work.
- Ensure you have the correct permissions and account information before executing Gulp commands.
Frequently Asked Questions (4)
What happens to my local files when I run the `gulp extension:fetch` command?
Does the `gulp extension:fetch` command work with published extensions in SuiteCommerce?
What prerequisites are there for using the `gulp extension:fetch` command in SuiteCommerce?
Can I fetch files for custom extensions using the `gulp extension:fetch` command?
Was this article helpful?
More in Commerce
- Available Items Only Feature in NetSuite 2026.1
Available items only filtering boosts sales efficiency in NetSuite 2026.1 with Intelligent Item Recommendations.
- Commerce Extensions in NetSuite 2026.1
Commerce Extensions in NetSuite 2026.1 enhance performance and user experience in eCommerce.
- Convert Multiple Transaction Line Items into Configured Items in
Enhance transaction processing in NetSuite by converting multiple line items into configured items with improved session handling.
- New SuiteCommerce Features in NetSuite 2026.1
New SuiteCommerce features in NetSuite 2026.1 enhance user experience and improve eCommerce efficiency.
