No judgment shall be entered by confession on any bond or note where a mortgage on real estate has been or may be given for the same debt or in any action on the bond or note, unless, prior to the entry of the judgment, if by confession, or prior to the commencement of the action, if the proceeding be by action, there shall be filed in the office of the clerk or register of deeds and mortgages as the case may be, of the county, in which the real estate described in the mortgage is situate a written notice of the proposed judgment or action, setting forth the court in which it is proposed to enter the judgment or begin the action, the names of the parties to the bond or note and to the judgment or action, the book and page of the record of the mortgage, together with a description of the real estate described therein.
N.J.S. § 2A:50-6