Skip to main content

Putting Classes in Deployed Mode

Putting Classes in Deployed Mode

You might want to put some of your classes in deployed mode before you send them to customers; this process hides the source code.

For any class definitions that contain method definitions that you do not want customers to see, compile the classes and then use $SYSTEM.OBJ.MakeClassDeployed(). For example:

 do $system.OBJ.MakeClassDeployed("MyApp.MyClass")

For an alternative approach, see Adding Compiled Code to Customer Databases.

About Deployed Mode

When a class is in deployed mode, its method and trigger definitions have been removed. (Note that if the class is a data type class, its method definitions are retained because they may be needed at runtime by cached queries.)

You cannot export or compile a class that is in deployed mode, but you can compile its subclasses (if they are not in deployed mode).

There is no way to reverse or undo deployment of a class. You can, however, replace the class by importing the definition from a file, if you previously saved it to disk. (This is useful if you accidentally put one of your classes into deployed mode prematurely.)

FeedbackOpens in a new tab