For some reason the TeamTask property doesn't get updated if it is the only property that was changed.
This happens in the underlying API and not in Basic4ppc code.
One workaround is to change the Body property and then return it to the original value:
Erel's tweak works, except in the common situation that the task body is already empty, in which case the API doesn't see mytask.body as changing, and therefore doesn't update teamtask when update is called.
So you need to do:
mytask.teamtask = false
temp = mytask.body
if mytask.body="" then mytask.body="XYZZY" else mytask.body=""
mytask.update
mytask.body = temp
mytask.update
There is nothing magic about "XYZZY". Or is there...?