Skip to main content
Solved

How to Programmatically Open/Close Financial Period

  • April 19, 2024
  • 7 replies
  • 120 views

Forum|alt.badge.img

Hi Team

We have a requirement where on payment save we have to programmatically open the financial periods, if closed. I have tried to Implement logic in ARPaymentEntry graph on Save but it is not working as expected, can you help please to achieve this.

public delegate void PersistDelegate();
        [PXOverride]
        public void Persist(PersistDelegate del)
        {
            if (Base.Document.Current != null/* && Base.IsImport == true*/)
            {

                FinPeriodStatusProcess finPeriodStatusProcess = PXGraph.CreateInstance<FinPeriodStatusProcess>();
                finPeriodStatusProcess.Filter.Current.Action = FinPeriodStatusProcessParameters.action.Open;
                finPeriodStatusProcess.Filter.Current.FromYear = "2024";
                finPeriodStatusProcess.Filter.Current.ToYear = "2024";

                string month = "202404";
                string year = "2024";
                FinPeriod masterFinPeriod = PXSelect<FinPeriod, Where<FinPeriod.finPeriodID, Equal<Required<FinPeriod.finPeriodID>>,
                                                  And<FinPeriod.finYear, Equal<Required<FinPeriod.finYear>>>>>.Select(Base, month, year);
                finPeriodStatusProcess.FinPeriods.Current = masterFinPeriod;

                masterFinPeriod.Selected = true;
               // masterFinPeriod.Closed = true;
                masterFinPeriod.Status = "Open";
                finPeriodStatusProcess.FinPeriods.Update(masterFinPeriod);

                finPeriodStatusProcess.Actions["Process"].Press();
            }
            del();
        }

Thank you In Advance.

Best answer by Laura02

Hello,

To post any transaction in period 04-2024, from any screen, the status of the period must be Open.  Unless your users are posting into the future, it is normal for current Periods (April 2024) to be Open status.  Click Checkbox then Process as shown, or click Process All to open all periods of 2024.

Laura

View original
Did this topic help you find an answer to your question?

7 replies

Laura02
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3132 replies
  • April 19, 2024

Hello, 

Did you consider adding the AR Payment user to the Financial Supervisor role, and leaving period status as is?

Members of Financial Supervisor role may post to closed periods without re-opening/re-closing any periods.

 

Laura


Forum|alt.badge.img
  • Author
  • Varsity I
  • 36 replies
  • April 22, 2024

Hi @Laura02 

Thank you for the response.

Did you consider adding the AR Payment user to the Financial Supervisor role, and leaving period status as is? - Can you please suggest how we can do that ?

Members of Financial Supervisor role may post to closed periods without re-opening/re-closing any periods. - Not sure on this as we have to re-open the financial periods through code. So if  a payment is getting created, user does not have to specifically go to Financial Period screen and re-open the periods.


Laura02
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3132 replies
  • April 22, 2024

Hello,

Place the AR User in the Financial Supervisor role in Users screen as shown.

Members of Financial Supervisor may post to closed periods without reopen.

From the Acumatica Help:

Hope this helps! 

Laura


Forum|alt.badge.img
  • Author
  • Varsity I
  • 36 replies
  • April 22, 2024

Hi @Laura02 

We enabled the suggested modification and verified the implementation but it is not working as expected.


Laura02
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3132 replies
  • April 22, 2024

Hello,

Please post a screen shot of what happens when your AR user who is in the financial supervisor’s role attempts to post a payment to a closed period.

It’s important to know the status of the periods - In this case, Periods should be Closed, not Locked status.

Thank you.

Laura


Forum|alt.badge.img
  • Author
  • Varsity I
  • 36 replies
  • April 22, 2024

Hi @Laura02 

We have activated the Financial Supervisor role and verified with the Implemented code but still facing the Issue in Payment and Applications screen.

Please find the below screen shots.


​​​

Thank you


Laura02
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3132 replies
  • Answer
  • April 22, 2024

Hello,

To post any transaction in period 04-2024, from any screen, the status of the period must be Open.  Unless your users are posting into the future, it is normal for current Periods (April 2024) to be Open status.  Click Checkbox then Process as shown, or click Process All to open all periods of 2024.

Laura


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings