I am creating a Form via the solutionModel like this:
_jsForm = solutionModel.newForm(_jsFrm_registerName,_jsFrm_databaseSelected,_jsFrm_,tableSelected,_jsFrm_styleName,_jsFrm_show_in_menu,_jsFrm_width,_jsFrm_height);
where the variable _jsFrm_registerName is some value. For this example it is set to ‘defaultRegister’. The problem I’m having is that later when a user performs a certain set of actions I need to completely delete/destroy/remove, etc. the form so the same code above can once again be ran. I’m using the following code to attempt to do this but I still get an error:
if(forms[_jsFrm_registerName]){
var success = history.removeForm(_jsFrm_registerName);
if(success){
solutionModel.removeForm(_jsFrm_registerName);
}
}
I get the following error though the first time the user tries to perform the delete action:
The name 'defaultRegister' already exists as another form
Does anyone see what I might be doing wrong?
Thanks,
Keith