Converting records to lists of key-value pairs

A hardy perennial - Applescript records can be coerced to lists, but the keys are all dropped: the resulting lists contain only values.

Trying to convert records to key-value pairs (or simply learn programmatically which keys a record contains) is traditionally deprecated as a mis-use of Applescript, but this has not held back a flood of hacks, and at least one respectable set of library functions in a freely available scripting addition.
http://www.latenightsw.com/freeware/RecordTools/index.html

Here is yet another approach, which I find workable for many purposes.
The limitation is that it only works with key names that are either user-defined, or |enclosed| in pipe characters to distinguish them from system-defined tokens.

set recSample to {name:"Record to KeyValue list", |character|:"Experiment", status:"rough draft", author:"houthakker", date:(current date), ver:0.2, fontcolor:{58533, 37897, 38360}}

Rec2UserKeyValues(recSample)

on Rec2UserKeyValues(recAny)
	-- USE THE CLIPBOARD TO MAKE THE RECORD KEYS LEGIBLE
	set the clipboard to recAny
	set recLegible to (the clipboard as record)
	set lngPairs to count of (recAny as list)
	if lngPairs < 1 then return {}
	
	-- COLLECT ANY USER-DEFINED KEY-VALUE PAIRS
	set lstKeyValue to {}
	try
		set lstUser to list of recLegible
	on error
		display dialog (do shell script "osascript -e 'the clipboard as record'") buttons "OK" default button 1 with title "Contents of record"
		return {}
	end try
	
	repeat with i from 1 to (length of lstUser) - 1 by 2
		set end of lstKeyValue to {item i of lstUser, item (i + 1) of lstUser}
	end repeat
	
	-- IF ANY PAIRS ARE MISSING, TRY SOME SYSTEM-DEFINED KEYNAMES
	if (count of lstKeyValue) < lngPairs then
		try
			set beginning of lstKeyValue to {"Date", date of recAny}
		end try
		try
			set beginning of lstKeyValue to {"Name", name of recAny}
		end try
	end if
	lstKeyValue
end Rec2UserKeyValues