Deploying File Cabinet
Support avatar
Written by Support
Updated over a week ago

When deploying FileCabinet configuration elements, you may run into several deployment preview errors, mostly because of misconfiguration or missing parent folder instances.

Parent annotations in the FileCabinet

Consider a case of a FileCabinet Folder named SuiteScripts/test, with a file within it which is named script.js. script.js has a parent annotation (netsuite.folder.instance.SuiteScripts_test@d below) which is essentially serve as a Salto reference of the parent's folder instance.

netsuite.file SuiteScripts_test_script_js@ddv { 
bundleable = false
isinactive = false
availablewithoutlogin = false
generateurltimestamp = false
hideinbundle = false
path = "/SuiteScripts/test/script.js"
content = file("netsuite/FileCabinet/SuiteScripts/test/script.js")
_parent = [
netsuite.folder.instance.SuiteScripts_test@d,
]
}

Please see below details about the different errors and how to overcome them.

Missing a reference to the parent folder

This error is triggered whenever a non-top level file or folder is being added and it's missing its parent folder. The parent folder is needed so that Salto knows which folder to deploy to.

How can you solve this error?

This typically happens whenever the relevant file was edited or copied manually w/o selecting (via the comparison results) or copying (via edit) also the relevant folder. In order to solve this error, please return to the environment comparison results, where you should see the related parent folder diff and add it to your deployment.

Mismatches between the path folder and the parent annotation

There are 2 possible errors in this case:

  1. An error is triggered whenever a non-top level file or folder is being added and its parent folder annotation's path is different from the file's directory path. Due to the mismatch, Salto does not know which path to deploy to.

  2. An error is triggered whenever a top level folder is being added and it has a parent annotation, which it should not have.

How can you solve these errors?


This typically happens whenever the relevant file was edited or copied manually w/o selecting (via the comparison results) or copying (via edit) also the relevant folder. In order to solve this error, please return to the environment comparison results, where you should see the related parent folder diff and add it to your deployment.

Invalid parent annotation

The parent annotation value must be a list with one item in it - a Salto reference to the parent folder instance. An error is triggered whenever the parent annotation is invalid.

This typically happens whenever the relevant file/folder was edited manually, or that the parent folder is not included in the fetch configuration, and therefore does not exist in the environment (in this case the parent annotation will include the FileCabinet Folder - e.g "[/SuiteScripts/test]").

How can you solve this error?

In order to solve this error, please go to the deployment's source environment and include the folder path in the fetch configuration, then fetch that environment. When the fetch is done, run another environment comparison. Now you should see the parent folder Salto reference in the file/folder parent annotation.

Missing internal ID

Every file/folder in the FileCabinet has an unique internal ID, used by NetSuite to identify the file/folder upon different APIs (like URL navigation through NetSuite UI).

Salto is using internal IDs in order to delete or modify existing files/folders or to add new files/folders (and in that case the parent folder's internal ID is used).

How can you solve this error?

Fetching both source & target environments should get all files/folders internal IDs. Then you can run another comparison and proceed with your deployment.

Did this answer your question?