{"record":{"id":"42aaff8d40e67b8c","repo":"pentaho/pentaho-kettle","slug":"salesforceinput-errorgettingobject","errorCode":"SalesforceInput.ErrorGettingObject","errorMessage":"SalesforceInput.ErrorGettingObject","messagePattern":"SalesforceInput\\.ErrorGettingObject","errorType":"error_code","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforce/SalesforceConnection.java","lineNumber":392,"sourceCode":"      }\n      throw new KettleException( BaseMessages.getString( PKG, \"SalesforceInput.Error.Connection\" ), ex );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"SalesforceInput.Error.Connection\" ), e );\n    }\n  }\n\n  public void query( boolean specifyQuery ) throws KettleException {\n\n    if ( getBinding() == null ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"SalesforceInput.Exception.CanNotGetBiding\" ) );\n    }\n\n    try {\n      if ( !specifyQuery ) {\n        // check if we can query this Object\n        DescribeSObjectResult describeSObjectResult = getBinding().describeSObject( getModule() );\n        if ( describeSObjectResult == null ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"SalesforceInput.ErrorGettingObject\" ) );\n        }\n        if ( !describeSObjectResult.isQueryable() ) {\n          throw new KettleException( BaseMessages.getString(\n            PKG, \"SalesforceInputDialog.ObjectNotQueryable\", module ) );\n        }\n        if ( this.recordsFilter == SalesforceConnectionUtils.RECORDS_FILTER_UPDATED\n          || this.recordsFilter == SalesforceConnectionUtils.RECORDS_FILTER_DELETED ) {\n          // The object must be replicateable\n          if ( !describeSObjectResult.isReplicateable() ) {\n            throw new KettleException( BaseMessages.getString(\n              PKG, \"SalesforceInput.Error.ObjectNotReplicateable\", getModule() ) );\n          }\n        }\n      }\n\n      if ( getSQL() != null && log.isDetailed() ) {\n        log.logDetailed( BaseMessages.getString( PKG, \"SalesforceInput.Log.SQLString\" ) + \" : \" + getSQL() );\n      }","sourceCodeStart":374,"sourceCodeEnd":410,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforce/SalesforceConnection.java#L374-L410","documentation":"In query(), when not using a custom SQL query, the code describes the configured module (SObject) and throws this KettleException if Salesforce returns a null DescribeSObjectResult. It means the object definition could not be retrieved for the given module name.","triggerScenarios":"query(specifyQuery=false) where getBinding().describeSObject(getModule()) returns null — typically an unknown/misspelled object name.","commonSituations":"Typo in the Salesforce object/table name; custom object name missing its __c suffix; object not visible to the integration user (API access or permissions).","solutions":["Correct the module/SObject name in the Salesforce Input step (include __c for custom objects).","Verify in Salesforce Setup > Objects that the object exists and its API name matches.","Grant the integration user read/field permissions and API access on the object.","Log the module string right before query() to catch whitespace or case issues."],"exampleFix":"// before\nconn.setModule(\"Account Custom\"); // not a valid API name\n// after\nconn.setModule(\"Account_Custom__c\");","handlingStrategy":"validation","validationCode":"// Pre-validate the SObject API name before query()\nif (module == null || module.isBlank()) throw new IllegalArgumentException(\"module required\");\n// Optionally describe first to confirm existence","typeGuard":null,"tryCatchPattern":"try {\n  conn.query(false);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"ErrorGettingObject\")) {\n    logError(\"Cannot describe object \" + conn.getModule() + \" - check API name/permissions\");\n  }\n  throw e;\n}","preventionTips":["Use the exact API name with __c suffix for custom objects.","Verify the object exists via Workbench describe.","Grant the integration user object and field permissions."],"tags":["salesforce","metadata","resource-not-found","kettle"],"backgroundTag":"resource-not-found","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"}