The court who do not have the subject matter jurisdiction can not adjudicate the case/ matter. What is the subject matter in dispute and which court has adjudicated /
Pecuniary (financial limits) and place (territorial) jurisdiction has to be considered by the Court, even if it is ommitted by parties to lis.
Issue of jurisdiction can be raised at any stage.
Whether Trial Court has already decided/ order and judgment passed / decree drawn ?
Facts posted are incomplete.
Show the case file to a local prudent lawyer for better appreciation of facts and professional advise.