In a trial court, if no alternative writ is sought, proof of service of a copy of the petition need not accompany the application for a writ at the time of filing, but proof of service of a copy of the filed petition must be lodged with the court prior to a hearing or any action by the court.
Ca. Civ. Proc. Code § 1088.5