HI, 

Attach is sample code to do batch processing. 
Thakns, 
Touseef 


      Add online presence to your web pages, find out how here - 
http://messenger.yahoo.com/addpresence.php

  ----------

Exportfile for AOT version 1.0 or later
Formatversion: 1

***Element: CLS

; Microsoft Business Solutions-Axapta Class: Test_RunbaseBatch unloaded at 
Wednesday 25/04/2007
; 
--------------------------------------------------------------------------------
  CLSVERSION 1
  
  CLASS #Test_RunbaseBatch
    PROPERTIES
      Name                #Test_RunbaseBatch
      Extends             #RunBaseBatch
      RunOn               #Called from
    ENDPROPERTIES
    
    METHODS
      Version: 3
      SOURCE #canGoBatchJournal
        #public boolean canGoBatchJournal()
        #{
        #    return true;
        #}
      ENDSOURCE
      SOURCE #classDeclaration
        #class Test_RunbaseBatch extends RunBaseBatch
        #{
        #    // Packed variables
        #    transDate       transDate;
        #    custAccount     custAccount;
        #
        #    // Dialog fields
        #    DialogField     dlgCustAccount;
        #    dialogField     dlgTransDate;
        #
        #    #define.CurrentVersion(1)
        #    #define.Version1(1)
        #    #localmacro.CurrentList
        #        transDate,
        #        custAccount
        #    #endmacro
        #}
      ENDSOURCE
      SOURCE #dialog
        #public Object dialog()
        #{
        #    DialogRunbase       dialog = super();
        #    #resAppl
        #;
        #    dialog.addImage(#ImageEmployee);
        #    dialog.addInfoImage();
        #    dlgTransDate = dialog.addFieldValue(typeid(transDate),transDate);
        #    return dialog;
        #}
        #
      ENDSOURCE
      SOURCE #dialogPostRun
        #public void dialogPostRun(DialogRunbase dialog)
        #{
        #;
        #    super(dialog);
        #}
      ENDSOURCE
      SOURCE #getFromDialog
        #public boolean getFromDialog()
        #{
        #;
        #    transDate   = dlgTransDate.value();
        #    custAccount = dlgCustAccount.value();
        #
        #    return super();
        #}
      ENDSOURCE
      SOURCE #init
        #public boolean init()
        #{
        #    return true;
        #}
      ENDSOURCE
      SOURCE #pack
        #public container pack()
        #{
        #    return [#CurrentVersion,#CurrentList];
        #}
      ENDSOURCE
      SOURCE #run
        #public void run()
        #{
        #    if (! this.validate())
        #        throw error("");
        #
        #    try
        #    {
        #        ttsbegin;
        #
        #        // this.Update();
        #        /// write your code here........
        #
        #
        #        ttscommit;
        #    }
        #    catch (Exception::Deadlock)
        #    {
        #        retry;
        #    }
        #
        #}
      ENDSOURCE
      SOURCE #unpack
        #public boolean unpack(container packedClass)
        #{
        #    Version version = runbase::getVersion(packedClass);
        #;
        #    switch (version)
        #    {
        #        case #CurrentVersion:
        #            [version,#CurrentList] = packedClass;
        #            break;
        #        default:
        #            return false;
        #    }
        #
        #    return true;
        #}
      ENDSOURCE
      SOURCE #validate
        #public boolean validate()
        #{
        #    if (false)
        #        return checkFailed("");
        #
        #    return true;
        #}
      ENDSOURCE
      SOURCE #construct
        #server static Tutorial_RunbaseBatch construct()
        #{
        #    return new Tutorial_RunbaseBatch();
        #}
      ENDSOURCE
      SOURCE #description
        #// Here goes a description of the class
        #static ClassDescription description()
        #{
        #    return "@SYS70984";
        #}
      ENDSOURCE
      SOURCE #main
        #static void main(Args args)
        #{
        #    Test_RunbaseBatch    tutorial_RunBase;
        #;
        #    tutorial_RunBase = new Test_RunbaseBatch();
        #
        #    if (tutorial_RunBase.prompt())
        #        tutorial_RunBase.run();
        #}
        #
      ENDSOURCE
    ENDMETHODS
  ENDCLASS

***Element: END


[Non-text portions of this message have been removed]

Reply via email to