Tuesday, June 25, 2019

Avoid error “<field id> is not a valid internal id” for custom fields with field id starts with "cust" created via SuiteScript Objects in SuiteCloud IDE

Since UI elements are created dynamically, it does not have any supporting backend data models. There is disconnect between the UI and backend data, hence the script-created fields' values will not be saved.

These fields are not supported in SuiteCloud IDE field validation hence it will show error "<field id> is not a valid internal id"

If not using "Sync Script ID from Account" functionality and a field starts with "cust" then validation for that field is ignored. But if use is using "Sync Script ID from Account", then this is validated.

In order to avoid this error, the user can add each custom fields internal id to a text file , one id per line.

1. In SuiteCloud IDE, go to Window > Preferences. The Preferences window opens
2. In the left-hand pane, navigate to NetSuite > Validation. The Validation Preferences view is shown.
3. Under Validation Preferences, select the Validation Type that you want.
4. Select the Ignore List text file.
5. Click Apply
6. Click OK
7. Rebuild the project by going to Project > Clean
8. On Clean window screen , select "Clean projects selected below"  then check the Project
9. Click OK

If you go back to the SuiteScript file, no error "<field id> is not a valid internal id" will be shown.

No comments:

Post a Comment