I want to comment few lines of code in Main() method of standard class given by microsoft.
How can i do this trough extension?
Create a new model with reference to application suite as the class i want to make changes is in it and then how can i override write the main() method to comment code.
When you say that you have to change existing code ("comment few lines of code in Main() method of standard class"), you already failed. This can't be done in extensions.
Think again if your goal can't be achieved by an extension. Tell us more about your business requirement if you need help.
If there is no way how to achieve what you need with extensions, you can send an extensibility request to Microsoft.
Thank for your information. I am totally new to ax and haven't done any extensions yet. Just now i came to know that can't be done with extension and there is an issue already open to Microsoft to fix this issue.
Are you sure you've considered all your options? If you're new to AX, maybe you don't even know them. For example, couldn't Chain of Command help you?
I spoke with senior developer and he told me its not possible with extension and i need to wait for hotfix from microsoft