How to delete form without clicking on it?

I have a form in AOT and in Project. If I click on that form in AOT the axapta stop working. If I click on project axapta stop working. It is a test form that can be deleted. Is there some way how to permanently delete form from AOX without clicking on it?

I try to find a form in file system but I can not find it.

we can create new tables from job and so we can delete the existing tables from the job itself…

AOS crashed due corrupted node in the AOT

Warning: this post is only informative, do not try to replicate the problem described here in a production environment. !!!

The problem:

The problem occurred when we created a ‘View’ with one circular reference. After that, every time we tried to click over “Data Dictionary\Tables” or “Data Dictionary\Views”, the AOS crashes.

How to reproduce the problem:

Warning: this post is only informative, do not try to replicate the problem described here in a production environment. !!!

  1. Make a backup. Also, make a copy of the AxCus.AOD file.
  2. Create a simple view (ex. View1).
  3. Add a new DataSource manually. Then, open DataSource’s properties dialog and specify in the table field the name of the view you have created (ex. View1).
  4. STOP at this point if you dont want to crash the AOS !!!.
  5. Expand the DataSource node. Drag the field CreatedBy to the view’s fields. It will create the CreatedBy1 field.
  6. Save it if you are sure you want to continue. After this action, your AOS will crash. (oops !)

You can try to recover the error by deleting the corrupted node (ex. View1 or CreatedBy1 field) using this method: How to delete AOT objects (AX/Axapta) or this other: How to delete AOT nodes by code (UtilIdElements solution). None of them will work!!!.

The solution:

After several tries, the only solution was open the AxCus.AOD file in a binary editor (Visual Studio is enough) and perform the next steps.

Warning: Serious problems might occur if you modify the AxCus.AOD file using this or another method. Modify system files at your own risk.

  1. Make a backup. Also, make a copy of the AxCus.AOD file.
  2. Stop the AOS and open the AxCus.AOD in a binary editor.
  3. Locate the “CreatedBy1″ field data (or your corrupted node’s name). Normally, it should be near to the end of the file. (Look at pictures for details).
  4. Change the reference data. It is above the field’s name. Put the value FF FF (65,535) in the parent and field ids.
  5. Save the file.
  6. Delete the index file axapd.aoi.
  7. Start the AOS again.
  8. Delete the corrupted view.

Image with the corrupted node:

Image with the fixed node:

It is probable the corrupted node stays alive in the AOT, so you can try the following code to remove it:

static void Job1(Args _args)
{
UtilIdElements utilElement;
;

ttsbegin;

select utilElement
where utilElement.id == 65535; // Invalid ID we have writed in the AxCus.AOD file

if (utilelement)
{
utilElement.delete();

ttscommit;
info(‘Record should be deleted now.’);
}
else
{
ttsAbort;
info(‘Could not delete record, or it was not found.’);
}
}

http://ismailozcan68.wordpress.com/2012/05/07/aos-crashed-due-corrupted-node-in-the-aot/

Highlight AOT and route to Forms with up down button and press delete

If the form is selected any way in AOT (for example multiple forms are selected by alt+arrow) the axapta will stop working (=no deleting).

can print screen ?

Try to Write a job follwing Code

TreeNode treeNode

;

treeNode = TreeNode::findNode(#FormsPath);

//Here your logic

I was able to renaming project and after that the axapta stop freezing after opening project.

I can show print screen, but it is standard “Microsoft Dynamics … Stop working” system message.

At the end I was able to move corrupted folder (with renaming project trick) to some dummy project. It is still there but we do not care.