+ Start a Discussion

make sforce ignore a field in an SObject?

Hello. I have modified the SObject class so that it contains an additional field - along with a set* and get* for the field. However the corresponding field does not exist in Salesforce.com. When I attempt to persist the object through sforce, I get the exception:

e:common.exception.ApiException: No such column 'deletedInSF' on entity 'Account'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names

This makes sense. But is there a way to make sforce ignore this field (for example, does the parser do any sort of filtering when it is querying an object?). Obviously I can handle it through the object hierarchy, but I'd like to know if I can make the API ignore the field instead.


Hi cmarkiewicz,

Modifying the generated classes is a bad practice because the next time you regenerated the classes your mods are discarded.

I think you should be trying to wrap or extend the SObject class or Account class.