I suspect that your issue is the event that you're using.
In the sample that you're using as an example, a separate table is being updated. In your case, you're actually updating a Dynamics GP table. It seems like you're interfering with the GP update operation.
I would try using the "Updated" event instead of the "Updating" event. The Dynamics GP process that's updating the record should have finished by the time the "Updated" event is run, so then you should no longer be conflicting with the GP operation.