Sage SDK APTimeSlipActivityInfo

Hi


I been trying to use the SDK to import time slips but without success, I can't initialize the object APTimeSlipActivityInfo which looks like the one that I should use.

Any help or example about how to do that would be appreciated.

Regards,

Christian Elena

  • 0

    Hi Christian,

    As far as I can understand, APTimeSlipActivityInfo is for taking *existing* time slip data, and adding it to an invoice - just as one could do from the Sales Invoice screen in Sage 50.

    If importing a formatted text file from the interface, or using Sage_SA_import.exe (in Single User Mode Only!) won't work,

    You may have to:
    - use the blunt instrument of SQL through an ODBC connection, or
    - Use the methods described in dev-progref.pdf. (icky to build, but probably solid to run)

    Or, you could go a whole other way with the hack of using something like 'AutoHotKey' to bang the timesheets in from a virtual keyboard on a spare workstation or Virtual Machine. This method would have the advantage of nearly 100% safety from data corruption (or at least from having to check your code and wonder whether it's your fault!).

  • 0 in reply to RandyW
    Hi Randy

    So there is no way to insert time slips using the objects of the SDK, like the ones used for Customers or Invoices?
    Also would be an option to import the time slips using an imp file and then update the imported entries using the SDK, because the APTimeSlipActivityInfo has an option to save the object.

    Regards,
    Christian Elena
  • 0 in reply to minimedik

    minimedik said:
    So there is no way to insert time slips using the objects of the SDK, like the ones used for Customers or Invoices?

    Hi Christian,

    I can't say for certain that there isn't, but there's no example in the sample c# file, and none of the TimeSlip methods appear to be capable of creating a new time slip.

    While Sage staff regularly post here, this is primarily a peer-to-peer forum.   I'm not one of those Sage staff, so I have access only to public knowledge and my own experience (but unlike the SDK support people I don't require your credit card number to give you my best answer. )

    minimedik said:
    Also would be an option to import the time slips using an imp file and then update the imported entries using the SDK, because the APTimeSlipActivityInfo has an option to save the object.

    If you mean that you could, for example, create 1000 blank time slips, prenumbered and partially filled out to match employees' time books, then add information to them as needed, I suppose that you could.

    But I would think it's probably better to write your code so as to create each slip in a separate transaction. 

    If it's the thought of writing the SQL from scratch that you don't like, I've found I could could turn on MySQL logging, fire up SA, key in several time slips, then see what SQL is logged. 

    I notice that the 'save' method has a note in the help file that it shouldn't be used, because it's just an override of the parent.  Not sure why that would be a problem, but it didn't sound good.

    I hope that helps, please post back!

    Randy