Can we perform actions like taking backup or initiating Data Synchronization before closing the Comp

Discussion in 'Knowledge Base' started by admin, May 17, 2013.

         
Loading...
  1. admin

    admin Administrator Staff Member


    Query

    Can we perform actions like taking backup or initiating Data Synchronization before closing the Company?

    Solution

    Yes, this can be done using Event Framework. An Event Close Company is available, which can be used to perform the actions needed like Taking Backups, Synchronizing Data with Head Office, etc.

    Syntax:

    [System: Event]

    <Event Name> : <Event> : <Logical Condition> : <Action> : <Action Parameters>

    Where,

    Event Name can be any unique identifier and if same name is repeated multiple times, the last event will be executed, Event denotes when to execute this action
    Logical Condition can be specified so that the Event is executed only if the given condition is satisfied
    Action can be any action like CALL, DISPLAY, etc.
    Action Parameters depend on the Action i.e., if Action is CALL, Action Parameter expects a Function Name whereas if Action is DISPLAY, Action Parameter expects Report Name

    Example:

    [System : Events]

    CmpCloseEvent : Close Company : $$IsCmpOwner : Display : Profit And Loss
     



  2. Saran Prabhu

    Saran Prabhu New Member


    how to write a system event that calls a function every single minute
     



  3. Taufeeq Shaikh

    Taufeeq Shaikh Active Member


    Mr. Saran you need to give a System Event followed by a Function to run at every single minute.
     
    kamalpatel likes this.



  4. Saran Prabhu

    Saran Prabhu New Member


    Can u please help in correcting the below code
    [#Menu : Gateway of Tally]
    Add : Key Item : Before : @@locAccountingVouchers : "Test System Event" : V : Call: Test System Event

    [Function : Test System Event]
    00 : Call : XPAutoRefresh : 60

    [Function: XPAutoRefresh]

    PARAMETER : pXVarRefreshInterval : Number

    100 : IF : ((##pXVarRefreshInterval = 0) OR ($$IsEmpty:##pXVarRefreshInterval))
    120 : ACTION : STOP TIMER : RefreshCall
    130 : END IF
    140 : IF : ##pXVarRefreshInterval > 0
    150 : ACTION : START TIMER : RefreshCall : (##pXVarRefreshInterval * 60)
    160 : END IF

    [System: Events]
    RefreshCall : TIMER : TRUE : CALL : Test

    [Function : Test]
    00 : SET FILE LOG ON
    01 : LOG : "Event Working"
    03 : SET FILE LOG OFF
    04 : Exec Command : Notepad : "TDLFunc.Log"
    05 : Msg Box : "Test System Event" : "System Time is " + $$MachineTime
     
    khushbu likes this.



  5. Saran Prabhu

    Saran Prabhu New Member


    Mr.Taufeek Thanks for the reply its working.Thanks again
     
    kamalpatel likes this.



  6. Mahesh Sethi

    Mahesh Sethi Member


    Dear Mr. Saran Prabhu,

    ITS WORKING & Very helpful.

    Thanks to you sharing knowledge.

    Manish
     
    kamalpatel likes this.



Share This Page