Unable to delete invalid form
Hi,
I have created form with invalid name through code:
var form = formManager.CreateForm("Feedback Form");form.Title = "Feedback Form Title";form.Name = "Feedback Form Name"; // This is invalid name which will break the formformManager.PublishForm(form);formManager.SaveChanges();
I have created and saved invalid form. Now I'm unable to go to Content -> Forms because exception gets thrown when I call
var formManager = FormsManager.GetManager();
Exception:
[ArgumentOutOfRangeException: The artificial type name must be a valid language independend identifier.Parameter name: nameActual value was Feedback Form Name.] Telerik.OpenAccess.RT.ArtificialBase.GenerateType(String nsname, String name, Type idFieldType, String idFieldName, String superClassName) +768 OpenAccessRuntime.metadata.MetaDataBuilder.CreateArtificialTypes(PackageMetaData[] packageMetaDataParam) +1335 OpenAccessRuntime.metadata.MetaDataBuilder.buildMetaData(DataObjectsRoot[] roots, Boolean ignoreNoClasses) +727 OpenAccessRuntime.Relational.RelationalStorageManagerFactory..ctor(StorageManagerFactoryBuilder b) +1321 OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL() +184
It's easy to mistype the name and end up in a similar position. Is there a way to fix this through code or by modifying values in the database (something I'd like to avoid)?
I have tried to remove all the forms by doing the following:
foreach(var form in formManager.GetForms()) formManager.Delete(form);
but I'm unable to execute this as I can't create a form manager.
Edit: This is by no way a solution, but it allowed me to carry on with prototyping. I have searched all SF tables for a string token and then removed all the rows where this string token appeared. This is something that we must avoid for a range of good reasons.
Thank you,
Viktor
Hello Viktor,
I believe I already answered you about this problem in the support ticket that you opened. So, I will close this thread, to not duplicate responses.
Kind regards,