{"record":{"id":"5fd23fa0f4b69fe0","repo":"pentaho/pentaho-kettle","slug":"salesforceupdatedialog-fieldsmissing-dialogmessage","errorCode":null,"errorMessage":"SalesforceUpdateDialog.FieldsMissing.DialogMessage","messagePattern":"SalesforceUpdateDialog\\.FieldsMissing\\.DialogMessage","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupdate/SalesforceUpdate.java","lineNumber":79,"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( PKG,\n            \"SalesforceUpdateDialog.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( \"Field [\" + meta.getUpdateStream()[i]\n              + \"] couldn't be found in the input stream!\" );\n        }\n      }","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupdate/SalesforceUpdate.java#L61-L97","documentation":"In SalesforceUpdate.processRow(), if the update mapping grid contains zero fields (meta.getUpdateLookup().length == 0), the step throws a KettleException with message key 'SalesforceUpdateDialog.FieldsMissing.DialogMessage'. The step refuses to run because there is nothing to update in Salesforce — the field mapping between the stream and Salesforce fields was never configured.","triggerScenarios":"Executing a transformation whose Salesforce Update step has an empty 'Update lookup fields' table — e.g. the step was dropped and run without configuring the mapping, or the grid was cleared.","commonSituations":"New step added but never configured; mapping lost after loading metadata from an incompatible source; generated transformations programmatically without calling setUpdateLookup/setUpdateStream.","solutions":["Open the Salesforce Update step dialog and populate the lookup/update field grid before running.","Verify the .ktr XML for the step contains the expected update_lookup/update_stream entries.","If building metadata in code, call allocate(n) plus setUpdateLookup/setUpdateStream with n > 0."],"exampleFix":"// before: step metadata with empty mapping\nmeta.setUpdateLookup(new String[0]);\nmeta.setUpdateStream(new String[0]);\n// after\nmeta.allocate(1);\nmeta.setUpdateLookup(new String[] { \"Id\" });\nmeta.setUpdateStream(new String[] { \"account_id\" });","handlingStrategy":"validation","validationCode":"// Validate mapping before executing the transformation\nSalesforceUpdateMeta meta = (SalesforceUpdateMeta) stepMeta.getStepMetaInterface();\nif (meta.getUpdateLookup() == null || meta.getUpdateLookup().length == 0) {\n  throw new IllegalArgumentException(\n    \"Salesforce Update step '\" + stepMeta.getName() + \"' has no field mapping configured\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute(null);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"FieldsMissing\")) {\n    log.error(\"Configure the Salesforce Update field mapping before running\");\n  }\n  throw e;\n}","preventionTips":["Always open and configure new Salesforce steps before running the transformation.","Validate metadata programmatically (meta.check()) before scheduling runs.","When generating steps in code, call allocate(n) with n > 0 and set both lookup and stream arrays.","Diff .ktr files after edits to confirm the mapping grid entries persisted."],"tags":["kettle","configuration","salesforce","field-mapping"],"backgroundTag":"empty-required-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"}