posted by Bart .
What's wrong with the following sentence?
He was in trouble for acting like a tomfoolery.
It has to do with the part of speech of "tomfoolery." Here is a definition of that noun:
Main Entry: tomfoolery +t@m-!fU-lu-rE
Pronunciation: \ ˌtäm-ˈfül-rē, -ˈfü-lə- \
1812playful or foolish behavior
Merriam-Webster Online Dictionary copyright © 2009 by Merriam-Webster, incorporated
You could use "tomfool" in its place.