I have a situation where setting a field on a node occasionally fails. According to the documentation:
setField(fieldName as String, value as Object) as Boolean
Sets the value of the subject node field identified by fieldNameto value. This will fail and stop script execution if the value is not of the appropriate type. Returns true if the field is successfully set, false otherwise.
So, setField() is definitely returning false, and the field type is definitely correct (it's defined as a string, and I'm definitely attempting to set a string on it). Is there anything else that could make setting a value on a field fail besides a type mismatch?
Are you sure it is returning False? From what i remember, setField() was "silent but deadly", contrary to what TFM says - i.e. it was neither stopping with error nor returning false when called with wrong arguments.