Skip to Content
avatar image
Former Member

Current Financial Period

Hi,

I would like to be able to return the current financial period using the DI API. I can return all the periods using the example given in the help documentation but don't know how to identify the current one. Am I missing something obvious?

Manu thanks

Adrian North

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Sep 03, 2008 at 11:59 AM

    Adrian,

    If you're working with UI API 2005, then use

     oCompany.CurrentPeriod()
    

    to retrieve the currect period.

    If you're working with UI API 2007, then you cannot retrieve the current period has it doesn't apply to SAP Business One 2007A.

    {quote]

    Topic

    Current Period removed.

    Description

    In all SAP Business One versions up to 2005 A SP1, there is 'current period setting indicating the period enabled for data entry and posting. One period only can be set as current.

    From 2006 A, version on all periods will be enabled. Current period setting will be no longer used.

    Impact on Add-Ons

    When add-on will try to read out value from Company.CurrentPeriod, instead of period value, it will receive numeric value '-1'.

    Possible Solution

    Adjust the add-on to not use CurrentPeriod property.

    Object-Property/Method

    Company.CurrentPeriod.

    {quote}

    Regards,

    Vítor Vieira

    Add comment
    10|10000 characters needed characters exceeded