A11
Source: www.pathfindersrd.comWhen used against an object, the ray simply disintegrates as much as a 10-foot cube of nonliving matter. Thus, the spell disintegrates only part of any very large object or structure targeted. The ray affects even objects constructed entirely of force, such as forceful hand or a wall of force, but not magical effects such as a globe of invulnerability or an antimagic field.
A creature or object that makes a successful Fortitude save is partially affected, taking only 5d6 points of damage. If this damage reduces the creature or object to 0 or fewer hit points, it is entirely disintegrated.
And yes, objects get saving throws, especially if they are attended. Undead are basically Fort save = yes. So a Lich would take 5D6 points of damage.
A11 Addendum
Poor choice of spell on a lich. Targeting his attended items would be a better expenditure of this spell (but who wants to nuke the loot?), or perhaps the load bearing brick above the Lich (thank you again Knowedge: Dungeoneering and Knowledge Engineering) would make for a better tactic in the event that one needed a distraction for a hasty retreat.
EDIT: Though come to think of it, I'm unsure if they would roll Fortitude normally (chance for failure) if they would just take the 5D6 automatically, do not pass go, do not collect $200. See below, taken from the Undead template description.
Immunity to any effect that requires a Fortitude save (unless the effect also works on objects or is harmless).