There's a difference between designating Doe defendants in the caption of your lawsuit (e.g., naming "DOES 1 to 50") and substituting a later-discovered defendant in place of a designated Doe defendant. You may still designate Doe defendants in your amended complaint as long as your claim(s) against them are not barred by the applicable statute(s) of limitations.
If you found this answer helpful, let me know by clicking the "Mark as Helpful" button at the bottom of this answer or select it as Best Answer. It’s easy and appreciated. This response is intended to be a general statement of law, should not be relied upon as legal advice, does not create an attorney/client relationship and does not create a right to continuing email exchanges.
Not sure if you mean you didn't write in "and Does 1 to 50" or that you want to add a Doe defendant because you now know the identify of a defendant. Additionally I am not sure what the court found deficient in your complaint. More importantly merely amending the face page of the complaint and having a summons issued with "and Does 1 to 50" are insufficient to get the protection/benefits of CCO section 474. I would review that before anything. The answer to your question is "yes", but only if you do it correctly.
In general, where a court grants leave to amend after sustaining a demurrer, the scope of permissible amendment is limited to the causes of action to which the demurrer has been sustained. See People v. Clausen (1967) 248 CA2d 770, 785–786; Harris v. Wachovia Mortg., FSB (2010) 185 CA4th 1018, 1023. So, technically, the answer to your question is "no." In my experience, however, many judges will permit an amendment like the one you are attempting.
CCP § 473(a)(1) permits you to add DOE defendants on an ex parte basis, but you need to follow all of the procedural rules.
I suggest you call your opponent to let him/her know what you are doing and see if they will oppose it. If he/she does not oppose it then go ahead and add the DOES. If not, you might want to try the ex parte procedure.
Most importantly, however, you should get an attorney to represent you with this. My answer to this question should not be relied upon by you because I have not seen your case file, the underlying demurrer and the ruling on that motion. Litigation may seem easy, but it's not. The procedural and evidentiary rules you need to meet are complicated and exacting. Most people I know who represent themselves end up regretting it a the end of the dispute. I hope you are the exception to my experience, but if you can swing it, you should retain an attorney. Good luck to you.
The above is general legal and business analysis. It is not "legal advice" but analysis, and different lawyers may analyze this matter differently, especially if there are additional facts not reflected in the question. I am not your attorney until retained by a written retainer agreement signed by both of us. I am only licensed in California. See also avvo.com terms and conditions item 9, incorporated as if it was reprinted here.
As a matter of right you can amend your complaint, without leave of court. I suggest you consultant with an attorney, to protect your rights. Some of these things are not do it yourself projects. Best of luck.
This response will not create an attorney-client relationship between you and The Law Office of Anthony Munoz, and is not intended to serve as a legal advice in your specific circumstances. This response is a legal opinion based solely on facts represented and you should not rely on this legal opinion as a legal advice. You still need to consult an attorney directly to fully protect your legal rights.