
295 A.2d 47 (1972)
TIFFANY AGENCY OF MODELING, INC.
v.
FRANCIS M. BUTLER, Jr.
No. 1561-Appeal.
Supreme Court of Rhode Island.
September 20, 1972.
*48 William G. Savastano, Cumberland, for plaintiff.
Winograd, Shine & Zacks, David A. Schechter, Providence, for defendant.

OPINION
POWERS, Justice.
The plaintiff, known and hereafter referred to as TAM, is a Connecticut corporation which operates modeling, charm, and self-improvement school courses, agency placement services, studios and other types of related businesses. Additionally, at least for the purposes of the instant appeal, TAM has acquired national ownership of the trade name "TIFFANY AGENCY OF MODELING." Consequently, in furtherance of its corporate purposes, TAM enters into exclusive agency and franchise agreements with persons or corporations in various parts of the country whereby such person or corporation acquires an exclusive agency and franchise for a geographical location, as specified by the terms of the agreement.
On July 13, 1970, TAM and defendant, a Rhode Island resident, entered into an agreement whereby for a specified consideration defendant acquired an exclusive agency and franchise for the state of Rhode Island. Significantly, by the terms of this agreement, defendant was to incorporate within 60 days and assign to that corporation the right, franchise and license granted to him while retaining sole ownership in said corporation.
This agreement, although signed in Providence, expressly provided that it would only become effective upon approval and execution by TAM at its studios in Springfield, Massachusetts. In partial consideration of the rights acquired by defendant, the latter, also on July 13, 1970, executed and delivered his promissory note to TAM. This note, in the sum of $7,500 was to be paid in 48 equal monthly installments commencing six months after the opening of franchisee's first studio. In further consideration, defendant was to render monthly accounts to TAM of his gross receipts, and pay to TAM six per cent thereof.
Pursuant to the provisions heretofore related, defendant on July 27, 1970, incorporated in this state under the name of Tiffany Agency of Modeling of Rhode Island, Inc. Whether defendant then assigned the exclusive agency and franchise to the Rhode Island corporation, and, if so, whether said corporation opened any studio or school does not appear.
In any event, TAM, alleging that defendant was in default of his promissory note and that there had been no monthly accounting, commenced a civil action, the complaint being filed in the Superior Court on April 2, 1971.
Thereafter on April 12, 1971, TAM made written application to the Secretary of State to register as a foreign corporation doing business in this state, pursuant to the provisions of G.L. 1956 (1969 Reenactment) § 7-1.1-99. This application was made out of an abundance of caution for TAM's right to maintain an action in this state in light of § 7-1.1-117.[1]
*49 However, on April 20, 1971, the Secretary of State advised TAM that its application could not be accepted for the reason that the corporate files of his department revealed that Tiffany Agency of Modeling of Rhode Island, Inc. was already registered. This being so, the Secretary of State further advised TAM that before its application for a certificate of authority could be accepted, it must be accompanied by a letter of consent signed by two officers of the Rhode Island corporation. See § 7-1.1-7(c)(1).
Meanwhile, TAM's caution in applying for a certificate of authority had proved to be well founded. On April 19, 1971, defendant served TAM with notice that he was filing a motion to dismiss the latter's complaint. This motion rested on the proposition that TAM, being a foreign corporation which had not registered to transact business in this state was precluded by § 7-1.1-117 from maintaining its action against defendant.[2]
Assuming, understandably, that any effort to obtain permission from defendant's Rhode Island corporation would be an exercise in futility, TAM made no such effort. Rather, it filed an objection to defendant's motion to dismiss, giving as its reason in substance, that its single transaction with defendant did not constitute transacting business in this state within the meaning of § 7-1.1-99 so as to be precluded by § 7-1.1-117 from maintaining its action against defendant.
A hearing on defendant's motion to dismiss and TAM's objection thereto was held by a Superior Court justice on April 30, 1971. There is no transcript of that hearing in the record, presumably because none was compiled. Neither, of course, is there a transcript of the arguments made to the Superior Court justice. The record does contain the Superior Court justice's rescript[3] which, in its entirety, is as follows:
"Defendant's motion to dismiss is granted on the grounds that the plaintiff is a foreign corporation not duly qualified in the State of Rhode Island and pursuant to Rhode Island statutes 1956 and 1969 reenactment, Chapter 7, Section 7-1.1-117 is not permitted to maintain any action, suit or proceeding in any court of this state. Prepare an order."
From the judgment accordingly entered, TAM seasonably appealed to this court.
Before turning to a discussion of why we conclude that the appeal should be sustained and the case remitted to the Superior Court for trial on the merits, we deem it advisable to comment on the posture in which the case was considered below.
It seems clear that defendant's motion to dismiss was made on the authority of Super. R. Civ. P. 12 and treated by the Superior Court justice as though it were a Rule 12(b) motion. If so, the motion was inapplicable. A 12(b) motion is in order only when offered as one or more of seven specific defenses.
Indeed, it would seem that the ground relied on by defendant, namely, failure of a foreign corporation to obtain a certificate of authority cannot support a Rule 12 motion to dismiss. The rationale behind that rule is that even if the party *50 moved against could prove what is alleged, he cannot recover.
This is not the situation in the case at bar. TAM, if it can prove its allegations, could recover, but, if defendant is correct, TAM is precluded from proceeding to judgment unless and until it obtains the certificate of authority required under § 7-1.1-117. New England Die Co. v. General Products Co., 92 R.I. 292, 168 A.2d 150 (1961).
Parenthetically then, it would seem that defendant was required to file a responsive pleading that would go to the merits of the controversy. So doing he could also have raised under Super. R. Civ. P. 17(b), the issue of TAM's capacity to maintain an action. The issue thus specially pleaded could be determined at the trial level, when, as is the case here, the plaintiff denies a lack of capacity to maintain its action. But, even should the defendant prevail on the issue of alleged incapacity, the plaintiff is entitled to acquire standing by compliance during the trial. Good Will Home Ass'n v. Drayton, 108 R.I. 277, 274 A.2d 750 (1971), and see 1 Kent, R.I. Civ. Prac. 17.5 at 167.
Here, however, and quite apart from defendant's failure to plead properly, the trial justice proceeded to grant defendant's motion to dismiss solely because the latter alleged that TAM was a foreign corporation doing business in this state without having first registered pursuant to § 7-1.1-99. At least there is nothing in the record to indicate that he considered either TAM's exhibits or its objection to defendant's motion. As heretofore pointed out, the thrust of TAM's objection was that an examination of said exhibits, would establish that, although an foreign corporation, it was not doing business in this state within the meaning of § 7-1.1-99.
It is apparent from the foregoing therefore that the case, as considered below, was not in a posture which could lead to the entry of the appealed judgment. Consequently, TAM's appeal is well founded.
This brings us, however, to a consideration of how the case should proceed in the Superior Court following our remand to that tribunal. Proper pleadings having first been filed, there must be a determination of whether TAM, admittedly a foreign corporation, does, in point of law, lack capacity to maintain its action. If decided adversely to TAM the latter should be given an opportunity to qualify by registering with the Secretary of State either by obtaining the written permission of defendant as sole owner of Tiffany Agency of Modeling of Rhode Island, Inc., or by obtaining a final decree of the Superior Court[4] establishing the prior right of TAM to the use of such name in this state. § 7-1.1-101(c)(2) (3), as amended.
However, as previously related, TAM's application to defendant for permission to register under TAM's corporate name might well be an exercise in futility. If so, that is, should defendant withhold permission, we would have no hesitancy in holding that defendant, in the unique circumstances of the instant case, should be estopped from invoking the provisions of § 7-1.1-117.
The inevitable result of calling on defendant to clear the way for TAM to register with the Secretary of State, or in the alternative, be estopped from questioning TAM's capacity to maintain its action, is *51 to eliminate the question of capacity from further consideration. Even so, we think that the ends of justice will be better served by reaching that result.
In consequence of the foregoing, therefore, it is our judgment that the case should be remitted to the Superior Court where, after the filing of appropriate pleadings, TAM's action for damages should go forward on the merits of the controversy.
The plaintiff's appeal is sustained, the judgment appealed from is quashed and the case is remitted to the Superior Court for further proceedings not inconsistent with this opinion.
NOTES
[1]  TAM made no effort to register prior to its negotiations with defendant, taking the position that such negotiations did not constitute transacting business within the meaning of G.L. 1956 (1969 Reenactment) § 7-1.1-99.
[2]  This section insofar as it is material here, provides as follows:

"No foreign corporation transacting business in this state without a certificate of authority shall be permitted to maintain any action, suit or proceeding in any court of this state, until such corporation shall have obtained a certificate of authority."
[3]  The rescript is inexplicably dated "Friday, June 30, 1971." Inexplicable, because April 30, 1971, was a Friday while June 30, 1971, was a Wednesday, In any event, the Superior Court justice's order was entered May 4, 1971, an obvious indication that his decision was rendered April 30, 1971.
[4]  Whether TAM could prevail on a petition to establish its prior right to the name of Tiffany Agency of Modeling, Inc., is, on this record, purely speculative. Moreover, assuming that it could prevail, the time involved in resolving the question would unduly prolong final disposition of the case on its merits. Hence, for the purposes of this case, we think that recourse to such a petition need not be considered.
