Found an approach to dynamically create a command button.