The BeforeClose event occurs when the window closes. It occurs before the Microsoft Dynamics GP window close event.
window_BeforeClose(AbortClose As Boolean)
• window – A window object.
• AbortClose As Boolean – If True, this parameter stops the window from closing, and stops the Microsoft Dynamics GP window close event from occurring.
Use this event is to cancel the window close if the contents in the window don’t meet certain criteria you’ve defined.