Hi Gayathri,

At run time you need to add this line of code. The object name for the sub menu (the one which is going to be customized) will be set at run time.

Regards,
Ram