Skip to Content

SP01(?): Set Default posting period using DI SDK?

Is there a way to set the default posting period using the DI SDK?

I have a program that creates invoices from delivery notes which works fine as long as the docdate is in the same period as the current month. I need to create invoices for delivery notes shipped on Apr 28. The invoice needs to be posted to April but today is May 2. I am using 2005A SP1. Adding an invoice with Apr 28 docdate generates error -5002 Date deviates from permissible range [OINV.DocDate]. 2005A SDK now has a companyservice object that exposes the period information but I have not figured out how to set the default period for a given company connection.

Has anyone done this or are there examples (samples) that show how to use the companyservice object?


Mark Eley

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    May 26, 2006 at 07:50 PM


    The period information being exposed is for reading purposes only, ie you can get the current period.



    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 17, 2006 at 10:29 PM

    Once connected to the DI API the period is the period as determined by the client's system date. I do not think there is a way to change this. I have however, written a program that changes the system date, connects to the DI API, posts the entries and then disconnects and re-sets the system date. This works, (but ugly!).

    Add comment
    10|10000 characters needed characters exceeded