If you’ve been creating a custom record in your Sandbox, finished coding up the rest of your project and are ready to bring everything over you can either looking at creating a bundle, or you can download the Object Definitions of each of your newly created Custom Records to transfer them over into Production.
There are a couple of things you may need to watch when you bring them over, such as the Object Definitions’ connections to other Custom Records already pre-existing in your Sandbox account.
Provided everything should be okay for your standalone project this is how you can transfer those Custom Records across without needing to design them from scratch again in your production account.
First, you’ll need to run a command-line prompt. This assumes you’re already connected to your Sandbox account in your terminal (run suitecloud account:setup
to check or change) and you already have suitecloud
installed.
If you’re good to go simply run a command where you’re changing the --scriptid
flag to the id
of your customrecord
id:
$ suitecloud object:import --type customrecordtype --scriptid customrecord_YOUR_RECORD_ID --destinationfolder /Objects
For example, if I have created a Custom Record and its id has the label: customrecord_my_awesome_record
I would import this record as an Object Definition into my project by running the command:
$ suitecloud object:import --type customrecordtype --scriptid customrecord_my_awesome_record --destinationfolder /Objects
(Similarly, if you need to import a customrole
then change the --type
parameter to role
and use the --scriptid
parameter as the name of the custom role, for example: suitecloud object:import --type role --scriptid customroleXYZ --destinationfolder /Objects
)
Suitecloud will then fetch the custom record and overwrite any existing project objects that I may have already downloaded of the same record.
The imported objects will overwrite the project objects
The following objects have been imported:
- customrecordtype:customrecord_my_awesome_record
Updating your manifest.xml
file
There may be instances where downloading the Custom Record may require updating your manifest.xml
file.
If this is the case you may need to add some or all (or other!) features to your manifest.xml
file (which is found in your src
folder):
|
|
Success of your download will mean the custom record from Netsuite has been added to your Objects
folder, or whatever you defined in your --destinationfolder
parameter.
It should look something like this:
|
|