For each entity in a BAM diagram, a .4gl file is created to contain the custom code.

Entity.4gl files are generated for programs, schemas, form entities, report entities, and Web Service entities. This file uses the filename of the entity with the .4gl extension. For example, a program named Order.4prg generates a file called Order.4gl.

All code events created for the entity are written to this file. You can add other custom code, for example, by defining public module variables. After this file is created, it is treated like a standard .4gl file and is no longer affected by the BAM.