Delete an object.

Is it possible to delete an object in navision using codes. how. can i have sample codes to do this?

Thanx in advance


Yes you can, but the code depends on the object type. For example, this code deletes the form 87900:


where Object is a record variable that references the Object table.


Just for testing purpose create 2 codeunits with Name Test1 & Test2

In Test1 Codeunit Create Global Variable

Name DataType Subtype Length
Object Record Object

write this code on On run function

Complie & run codeunit test1 …it will delete codeunit object with Name Test2.

hope it helps you

Remember that the licence and user and object must have permissions to delete in the Object table.

You can / must set the permissions for this to work.