Like everyone else said, voice recording can work as a method to record dreams.
Alternatively if you aren't able to use voice recording for some reason, you can still give writing/typing a try, but in a bit different way. As you wake up write or type most important events from dream as 'tags', which should not take much, and then through the day when you will be in better mood for writing/typing use the tags to recall the dream fully and make full entry.