{"record":{"id":"197657518677e763","repo":"pentaho/pentaho-kettle","slug":"salesforceinsertdialog-fieldsmissing-dialogmessage","errorCode":null,"errorMessage":"SalesforceInsertDialog.FieldsMissing.DialogMessage","messagePattern":"SalesforceInsertDialog\\.FieldsMissing\\.DialogMessage","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceinsert/SalesforceInsert.java","lineNumber":80,"sourceCode":"        flushBuffers();\n      }\n      setOutputDone();\n      return false;\n    }\n\n    // If we haven't looked at a row before then do some basic setup.\n    if ( first ) {\n      first = false;\n\n      data.sfBuffer = new SObject[meta.getBatchSizeInt()];\n      data.outputBuffer = new Object[meta.getBatchSizeInt()][];\n\n      // get total fields in the grid\n      data.nrfields = meta.getUpdateLookup().length;\n\n      // Check if field list is filled\n      if ( data.nrfields == 0 ) {\n        throw new KettleException( BaseMessages.getString(\n          PKG, \"SalesforceInsertDialog.FieldsMissing.DialogMessage\" ) );\n      }\n\n      // Create the output row meta-data\n      data.inputRowMeta = getInputRowMeta().clone();\n      data.outputRowMeta = data.inputRowMeta.clone();\n      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n                      metaStore );\n\n      // Build the mapping of input position to field name\n      data.fieldnrs = new int[meta.getUpdateStream().length];\n      for ( int i = 0; i < meta.getUpdateStream().length; i++ ) {\n        data.fieldnrs[i] = getInputRowMeta().indexOfValue( meta.getUpdateStream()[i] );\n        if ( data.fieldnrs[i] < 0 ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"SalesforceInsert.CanNotFindField\", meta\n            .getUpdateStream()[i] ) );\n        }\n      }","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceinsert/SalesforceInsert.java#L62-L98","documentation":"SalesforceInsert throws this when the update-lookup (field mapping grid) in the step configuration is empty. In processRow(), data.nrfields = meta.getUpdateLookup().length is checked at step init; if 0 fields are mapped, the step cannot build its output row meta and aborts with this message.","triggerScenarios":"processRow() executed with the Salesforce Insert step's field mapping table containing zero rows — i.e. the step was added/configured without mapping any Salesforce fields.","commonSituations":"Deploying a transformation where the mapping grid was never filled; mapping lost after a metadata migration or copy-paste; user cleared the grid believing values are optional.","solutions":["Open the Salesforce Insert step dialog and populate the field mapping table with at least one field/value pair","Verify meta.getUpdateLookup() is populated in the saved .ktr or repository metadata","Re-enter the mapping if it was lost during metadata migration"],"exampleFix":"// before (config)\n<fields></fields>  // empty mapping\n// after (config)\n<fields><field><name>FirstName</name><update>FirstName</update></field></fields>","handlingStrategy":"validation","validationCode":"StepMeta stepMeta = transMeta.findStep(\"Salesforce Insert\");\nSalesforceInsertMeta meta = (SalesforceInsertMeta) stepMeta.getStepMetaInterface();\nif (meta.getUpdateLookup() == null || meta.getUpdateLookup().length == 0) {\n  throw new IllegalStateException(\"Salesforce Insert has no field mapping configured\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute(null);\n} catch (KettleException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"FieldsMissing\")) {\n    log.error(\"Salesforce Insert mapping grid is empty — configure it in the step dialog\");\n  }\n}","preventionTips":["Always fill the field mapping table when adding a Salesforce Insert step","Review step configuration in code review / CI before deploying transformations","Re-verify mappings after metadata migrations or copy-paste operations"],"tags":["kettle","salesforce","configuration","validation"],"backgroundTag":"missing-required-config-field","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}