Setting Up NetSuite Accounts in SuiteCloud Extension for Visual Studio Code
You can set up the NetSuite accounts you want to customize. If you've added domains besides the default NetSuite ones, you need to configure account-specific details for those extra domains.
The following tasks are available for account setup:
-
Adding an Account in SuiteCloud Extension for Visual Studio Code
-
Setting an Account as Default in SuiteCloud Extension for Visual Studio Code
Adding an Account in SuiteCloud Extension for Visual Studio Code
SuiteCloud Extension for VS Code sends your account information to NetSuite during the authentication process. For more information, see OAuth 2.0 Authentication for SuiteCloud SDK.
Before you add an account, ensure you have a SuiteCloud project open in VS Code. For more information, see Creating a SuiteCloud Project in SuiteCloud Extension for Visual Studio Code.
To add an account:
You can also add an account by clicking Set Up Account in the status bar when you have a specific file from a project open in the editor.
-
In VS Code, open the Command Palette and enter
suitecloud
. -
From the dropdown list, select SuiteCloud: Set Up Account.
-
From the dropdown list, select New authentication ID.
-
From the dropdown list, select one of the following options:
-
Browser-based authentication – This option opens a new window or tab from your default browser so you can authenticate your account-role combination.
-
Machine-to-machine authentication – This option opens a window so you can authenticate your account-role combination. For this option, you're asked to enter the following parameters:
-
Account ID – References the NetSuite account ID.
-
Certificate ID – References the certificate ID you get from NetSuite after uploading the public key file.
-
Private key file – References the local path to the private key file that matches the certificate in NetSuite. For example:
d:/path/private-key.pem
.Important:To get the certificate ID, you need to generate an RSA certificate. The RSA certificate has two parts: the public key and the private key.
Upload the public key in the OAuth 2.0 Client Credentials Setup by choosing SuiteCloud Development Integration in the Application field and selecting the entity and role to map. This will generate a new row with the certificate ID value.
The private key path value is the location where the private key is saved.
For more information about how to generate the RSA certificate, see Certificate Conditions.
For more information about how to upload the public key, follow the steps in OAuth 2.0 Client Credentials Setup.
-
-
-
In the text field, enter an authentication ID.
Note:An authentication ID is a custom alias you give to a specific account-role combination, like
testaccountadmin
. -
Perform the next steps based on the authentication option you selected in Step 4.
-
If you picked Browser-based authentication, press Enter to use the production domain or type your custom domain, then follow the instructions in the browser prompt.
-
If you picked Machine-to-machine authentication, do the following in the corresponding fields:
-
Press Enter to use the production domain or type your custom domain.
-
Enter the account ID.
-
Enter the certificate ID.
-
Press Enter to continue with the selection of the private key file.
-
If everything is correct, your account is set up and ready to use in SuiteCloud Extension for VS Code.
-
Setting an Account as Default in SuiteCloud Extension for Visual Studio Code
Besides setting up your accounts in SuiteCloud Extension for VS Code, you can also set a specific account as the default for a project. The default account is used for all NetSuite actions, like deploy, list SDF custom objects, and upload files.
To set up an account as default:
-
In VS Code, open the Command Palette and type
suitecloud
. -
From the dropdown, pick SuiteCloud: Set Up Account.
-
From the dropdown, pick the authentication ID of the account you want to set as default.
The authentication ID you picked is now set as default for the project.
You can also set up an account as default by clicking Set Up Account in the status bar when you have a file from a project open in the editor.
Related Topics
- Installing and Setting Up SuiteCloud Extension for Visual Studio Code
- Downloading Visual Studio Code
- Installation Prerequisites for SuiteCloud Extension for Visual Studio Code
- Supported Versions of SuiteCloud Extension for Visual Studio Code
- Installing SuiteCloud Extension for Visual Studio Code
- The Command Palette in SuiteCloud Extension for Visual Studio Code
- How to Work with a SuiteCloud Project in SuiteCloud Extension for Visual Studio Code
- How to Work with Multiple SuiteCloud Projects in SuiteCloud Extension for Visual Studio Code
- Making a File Active in the Editor in SuiteCloud Extension for Visual Studio Code
- Managing NetSuite Accounts in SuiteCloud Extension for Visual Studio Code