Hello everyone. We are trying to trigger a SFTP i...
# suitescript
e
Hello everyone. We are trying to trigger a SFTP import at a particular time by running a scheduled script that saves a financial institution format profile record (ie. just replicating the behaviour that happens when you save a format profile through the UI). It works sometimes. When it fails, it gives a long-winded error about a field custpage_file_mapping exceeding 300 characters. There are two problems: 1. Cannot find this field anywhere. It must be hidden in one of the locked bundle scripts. 2. The format profile becomes corrupt and cannot be fixed through the UI: all linked accounts, bank codes, etc. are lost. The whole profile needs to be recreated manually. As the problem is intermittent, it seems like a script timing issue. Just wondering if someone has tried/seen this trigger technique and have a scripting workaround. Full error is:
Copy code
{
  "type": "error.SuiteScriptError",
  "name": "EXCEEDED_MAX_FIELD_LENGTH",
  "message": "The field custpage_file_mapping contained more than the maximum number ( 300 ) of characters allowed.",
  "stack": [
    "createError(N/error)",
    "(/SuiteBundles/Bundle 293699/com.netsuite.bsp/src/config/bsp_config_ui_fldmap.js:118)",
    "(/SuiteBundles/Bundle 293699/com.netsuite.bsp/src/config/bsp_config_ui.js:73)",
    "(/SuiteBundles/Bundle 293699/com.netsuite.bsp/src/config/bsp_config_ui.js:168)",
    "(/SuiteBundles/Bundle 293699/com.netsuite.bsp/src/config/bsp_config_ui.js:96)",
    "(/SuiteBundles/Bundle 293699/com.netsuite.bsp/src/ue/bsp_ue_format_profile.js:13)"
  ],
  "cause": {
    "type": "internal error",
    "code": "EXCEEDED_MAX_FIELD_LENGTH",
    "details": "The field custpage_file_mapping contained more than the maximum number ( 300 ) of characters allowed.",
    "userEvent": "beforeload",
    "stackTrace": [
      "createError(N/error)",
      "(/SuiteBundles/Bundle 293699/com.netsuite.bsp/src/config/bsp_config_ui_fldmap.js:118)",
      "(/SuiteBundles/Bundle 293699/com.netsuite.bsp/src/config/bsp_config_ui.js:73)",
      "(/SuiteBundles/Bundle 293699/com.netsuite.bsp/src/config/bsp_config_ui.js:168)",
      "(/SuiteBundles/Bundle 293699/com.netsuite.bsp/src/config/bsp_config_ui.js:96)",
      "(/SuiteBundles/Bundle 293699/com.netsuite.bsp/src/ue/bsp_ue_format_profile.js:13)"
    ],
    "notifyOff": false
  },
  "id": "",
  "notifyOff": false,
  "userFacing": false
}
b
fields with the custpage prefix are added via user event scripts
in this case BSP UE Format Profile
e
Thanks, @battk. Is there anyway to monitor what these scripts are trying to do even if they are locked? It would be helpful to get the value it thinks is a problem.
b
best option is to get help from support there