How do I update the content of a field type in the onAfterElementSave() method? I am building a field type for Craft that needs to do additional processing to the saved data once the element id is available. For this reason, the prepValueFromPost() method won't work, since the element id isn't available yet.

So how to update the content of the current element from the onAfterElementSave() method?
This will return the content for the specific element instance you're on:

$this-&gt;element-&gt;getContent()


And from there you can do your additional content processing.

When you're ready so save it, you can call:

craft()-&gt;content-&gt;saveContent($this-&gt;element);


There are several examples in craft/app/fieldtypes folder where Craft's native field types do additional processing like this.