Prevent Posting to Inactive GL Account

Follow

Comments

7 comments

  • Rebecca Ralls

    That formula keeps any record from using inactive GL-accounts, but do you have suggestions or examples of more nuanced validation rules that allow old records to keep their historic GL Account even if it is edited?

    0
    Comment actions Permalink
  • Rebecca Ralls

    My solution: I added a lookup to the  Accounting Period on the GL Account called "Inactive as of", and added a validation rule that requires that it be populated if active = false.  Then  on each of the above objects  I created a validation rule that checks whether the  GL Account is active  AND  whether  the end date of the Accounting period for the transaction is > than the end date of the "Inactive as of" period.

    AcctSeed__Expense_GL_Account__r.AcctSeed__Active__c =false && AcctSeed__Account_Payable__r.AcctSeed__Accounting_Period__r.AcctSeed__End_Date__c > AcctSeed__Expense_GL_Account__r.Inactive_as_of__r.AcctSeed__End_Date__c
    0
    Comment actions Permalink
  • Rebecca Ralls

    My solution: I added a lookup to the  Accounting Period on the GL Account called "Inactive as of", and added a validation rule that requires that it be populated if active = false.  Then  on each of the above objects  I created a validation rule that checks whether the  GL Account is active  AND  whether  the end date of the Accounting period for the transaction is > than the end date of the "Inactive as of" period.

    AcctSeed__Expense_GL_Account__r.AcctSeed__Active__c =false &&
    AcctSeed__Account_Payable__r.AcctSeed__Accounting_Period__r.AcctSeed__End_Date__c
    > AcctSeed__Expense_GL_Account__r.Inactive_as_of__r.AcctSeed__End_Date__c

    Edit: I've found  this approach to be problematic to use with both the GL Account and the GLAV variables.  If there is more than one GL  Account ((Like on Billing lines or SRE) just the validation rules max out the 15 object link limit. It's frustrating that the link to each separate GLAV (1-4) counts as a separate object against the limit even though it's 4 separate links to the same object.

    0
    Comment actions Permalink
  • Rebecca Ralls

    The object list for Financial  Suite above is incomplete:

    Time Card Day should not be on  it but the following ones should:

    • Accounts Payable(AP Override)
    • recurring AP Lines
    • recurring billing lines
    • Bank Deposit
    • Expense Lines
    • Project tasks
    0
    Comment actions Permalink
  • Rebecca Ralls

    Further question: Is it possible to put an optional filter on lookups to the GL Account and GLAV variable objects that only shows active options?

    0
    Comment actions Permalink
  • Sara B

    Rebecca, was the above your final solution?

    0
    Comment actions Permalink
  • Rebecca Ralls

    Almost.

    I added a "Last Active Day" date field and used a process builder process (for both GL Account and GLAV) to populate it with the last day of the related Accounting Period so I didn't have to look through the accounting period object in my validation rules.

    0
    Comment actions Permalink

Article is closed for comments.