Share via


JmgTermJob.module Method [AX 2012]

This method returns the module from where the job originates.

Syntax

public JmgModuleEnum module()

Run On

Called

Return Value

Type: JmgModuleEnum Enumeration
The module from where the job originates.

Remarks

Due to legacy issues, the module of an absence job is the JmgModuleEnum::IPC enumeration value.

Examples

The following example prompts the user for feedback depending on where the job originates from.

public void promptForFeedback(JmgJobId _inputJobId) 
{ 
    JmgTermJob jmgTermJob = new JmgTermJob(_inputJobId); 
    switch (jmgTermJob.module()) 
    { 
        case JmgModuleEnum::Prod: 
            // Prompt user for number of items produced. 
            break; 
        case JmgModuleEnum::Proj: 
            // Prompt user for cost category. 
            break; 
        case JmgModuleEnum::IPC: 
            // No need for feedback. 
            break; 
    } 
}

See Also

Reference

JmgTermJob Class