Share via


JmgJobBundleProjStartupForm.new Method [AX 2012]

Creates a new instance of the JmgJobBundleProjStartupForm Class.

Syntax

public void new(JmgJobBundle _jmgJobBundle)

Run On

Called

Parameters

  • _jmgJobBundle
    Type: JmgJobBundle Class
    The job bundle that contains the jobs that cost categories should be entered for.

Remarks

The JmgJobBundleProjStartupForm class should be instantiated only from the JmgJobBundleProjStartup form.

Examples

The following code example shows how the JmgJobBundleProjStartupForm class is instantiated from the init method on the JmgJobBundleProjStartup form.

public void init() 
{ 
    JmgRegistrationSetupId  registrationSetupId; 
 
    if (!SysDictClass::isEqualOrSuperclass( 
        classidget(element.args().parmObject()), classnum(JmgJobBundle))) 
    { 
        throw error(strfmt("@SYS22862", formstr(JmgJobBundleProjStartup))); 
    } 
 
    super(); 
 
    closeCancel = false; 
 
    startupForm =  
        new JmgJobBundleProjStartupForm(element.args().parmObject()); 
 
    jmgTmpJobBundleProjStartup.setTmpData( 
        startupForm.getTmpJobBundleProjStartup()); 
 
    if (element && element.args()) 
    { 
        registrationSetupId = element.args().parm(); 
    } 
 
    fKeyHandler = new JmgFKeyHandler(registrationSetupId); 
    fKeyHandler.disableFKeys(); 
 
    this.initButton(button_1, 1, registrationSetupId); 
    this.initButton(button_2, 2, registrationSetupId); 
    this.initButton(button_3, 3, registrationSetupId); 
    this.initButton(button_4, 4, registrationSetupId); 
    this.initButton(button_5, 5, registrationSetupId); 
}

See Also

Reference

JmgJobBundleProjStartupForm Class