The question
Now what kind of alternative to writing could a civilization of such creature develop in order to keep records and history?
There's a lot of great answers on other senses, so I'm just going to consider: why wouldn't these creatures use methods similar to ours in the first place?
Let's take the assumption using creatures that are basically dark-adapted humanoids, so that they think in a broadly similar way and want to write in a broadly similar way to us. Assuming that they have dark-adapted eyes, and the correct sort of genetic heritage if you want to keep it scientifically accurate, they could use the following:
Bioluminescence
The creatures could harvest or farm a bioluminescent ink from local creatures in the underdark, and use it for writing records. It would glow faintly (either in a visible spectrum or otherwise; see also below), allowing it to be seen, even in the dark.

A bioluminescent cave.
Infrared
Rather than relying on the visible spectrum, they could use a heat-contrast system coupled with IR vision. This could be a high-tech system (much like how we now use spreadsheets rather than abacuses and papyrus), but it also has a biological precedent: according to the ASU, snakes such as pit vipers, some boas, and some pythons can see in infrared.

An infrared view of a city street.
Ultraviolet
This could be a natural or a technological adaptation. Think of walking into a nightclub with UV lighting - things glow brightly. Again, there is a natural precedent for this: the ACU again reports that jumping spiders, bees, and rats can see in ultraviolet.

A butterfly and flower seen in ultraviolet.
Fit it into your plot
The great thing about these methods is that they allow 'normal' humans to interact with and understand the systems in use, allowing lots of potential for storytelling (in terms of cross-species communication attempts, as well as miscommunications based on how humans in your chosen setting already use IR and UV technologies).