JmgJobBundleStartup Class [AX 2012]

Retrieves startup information from a user about jobs that an employee should start working on.

class JmgJobBundleStartup

Run On

Called

  MethodDescription
Gg739189.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg739189.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg739189.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg739189.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg739189.pubmethod(en-us,AX.60).gif new Creates a new instance of the JmgJobBundleStartup Class.
Gg739189.pubmethod(en-us,AX.60).gif notify Releases the hold on an object that has called the wait method on this object. (Inherited from Object.)
Gg739189.pubmethod(en-us,AX.60).gif notifyAll Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.)
Gg739189.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg739189.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg739189.pubmethod(en-us,AX.60).gif run Runs the relevant startup form based on the type of bundle.
Gg739189.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg739189.pubmethod(en-us,AX.60).gif toString Returns a string that represents the current object. (Inherited from Object.)
Gg739189.pubmethod(en-us,AX.60).gif usageCount Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.)
Gg739189.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg739189.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Inherited from Object.)
Gg739189.pubmethod(en-us,AX.60).gif Gg739189.static(en-us,AX.60).gif ::main Provides an entry point for the JmgJobBundleStartup class when it is called from a menu item.
Top

Run this class by using the JmgJobBundleStartup::main method. A startup form is shown based on a JmgJobBundle object. The information given by the user is stored in the JmgJobBundle object. Whether the user canceled the startup form is stored in the Args object, which is supplied to the main method.

The following example shows how to prompt the user for a project category when they create a start registration on a project job. It creates a start registration for the specified employee on project job 10000567, and then prompts the user for the cost category. If the startup form is approved, the entered cost category is displayed.

JmgJobBundle              jmgJobBundle;  
Args                      args;  
MapIterator               mapIterator;  
JmgRegistrationParameters regParams;  
 
jmgJobBundle = new JmgJobBundle(jmgWorkerRecId); 
jmgJobBundle.addJob(JmgJobTable::find('10000567'));  
args = new Args(); args.parmObject(jmgJobBundle);  
JmgJobBundleFeedback::main(args);   
// Check to see if the user canceled the startup form. 
if (args.parmEnum() == NoYes::Yes)  
{  
    info("You canceled the startup form.");  
}  
else  
{  
    // Display the cost category entered by the user on the jobs to start. 
    mapIterator = jmgJobBundle.getNewJobsIterator();  
    while (mapIterator.more())  
    {  
        regParams = jmgJobBundle.getStartupParameters(mapIterator.key()); 
        info(strFmt( 
            "You entered: %1 in cost category for job id: %2",  
            regParams.costCategory(),  
            mapIterator.key()));  
    }  
}

Object Class
  JmgJobBundleStartup Class

Community Additions

ADD
Show: