tell application "Finder"
set testFolder to (target of front window) as alias
set winRef to (window of testFolder)
tell winRef
set current view to list view
tell its list view options
set visible of column modification date column to true # FAILED
set visible of column size column to false # FAILED
set visible of column version column to true # FAILED
set icon size to small
set text size to 12
set shows icon preview to true
set width of column name column to 300
set sort column to name column
set sort direction of sort column to normal
set sort column to size column # SCRIPT FAILS if size visible above is set to false
set sort column to name column
end tell
set toolbar visible to true
end tell
end tell
--> Finder got an error: A column must be visible to make it the sort column.