As an attorney, you must follow a strict code of ethical and professional behavior. The American Bar Association has conduct expectations and violations of those expectations can lead to punishment by the Bar Association and the potential loss of your license to practice law.
One situation you should prepare yourself for is how to handle a client committing perjury.
Has your client already committed perjury?
The first thing to consider is if the crime has already happened. If you just found out that your client intends to commit perjury, you can withdraw from representation, forcing your client to find other legal representation.
If the perjured testimony already occurred, you must notify the court right away. Part of the code of conduct requires you to notify the court when you have knowledge of false testimony.
Can you encourage your client to do the right thing?
Before you take your knowledge to the court, you do have the opportunity to persuade your client to do it instead. If you can convince the client to come clean with the judge, you do not have to disclose the information yourself.
Can you prioritize your obligation to the court?
One of the hardest things for any attorney is choosing between their obligation to their client and the obligation to the court. Your commitment to the court should come first, particularly in cases where you know that your client will perjure themselves.
Failure to follow through on knowledge of perjury is an ethics violation for an attorney. You could find yourself facing the Bar to try to preserve your license to practice if you fail to do the right thing.