The development of efficient protocols for the palladium-catalyzed cyclization reactions of secondary amides and carbamates.