You need to sign in to do that
Don't have an account?
Appending To Existing Field Value
I'm new to Salesforce and just started on a simple integration project that utilizes Salesforce WSDL / Java. I have a custom object with field that serves something like a history entry. Updates to this field are always appends to its current value. Since this value can grow in size i would like to avoid fetching the current value, do a string append then save it back. I'm looking for some options so that my java client can just send increments and have the Salesforce platform append the increment to the existing value. Is this possible to achieve with some sort of field configuration or special API? If not what are my other options? Thank you.
There's no out of the box way to do this in the API (people generally model history as rows in a related object), but if you wanted to do this without round tripping the strings over the api, you could build a custom web service in apex to do the appending, and then call that from java, it'd be something like
You could expand this to use dynamic apex and make it more generic (if you have history fields on lots of different objects), and of course, you could make a bulk version that updates a bunch of rows in one round trip.