The following describes how to create a validation rule for preventing the posting of a transaction to an inactive GL Account:
 
Context:
Accounting Seed allows GL Accounts marked as inactive:
  • To store data from prior periods
  • For GL Accounts that aren't used often 
  • For legacy GL Accounts
The Active state is also used to facilitate the Salesforce Lookup function. To prevent users from posting transactions to an inactive GL Account use the following technique.
Technique:
For each of the source transactions add a validation rule to the object to prevent posting a transaction to the inactive GL Account
 
Here is an example of the validation rule for the Account Payable Line object:
 
AcctSeed__Expense_GL_Account__r.AcctSeed__Active__c = False
 
Transactions Source Records: 
Financial Suite Only:
Account Payable Line
Billing Line
Billing Cash Receipt
Cash Receipt
Cash Disbursement
Journal Entry Line
Scheduled Revenue & Expense
Time Card Day
 
Full Product Only:
Manufacturing Inventory Movement
Inbound Inventory Movement
Outbound Inventory Movement
Purchase Order Inventory Movement
Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

7 Comments

  • 0
    Avatar
    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
    Avatar
    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
    Avatar
    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.

    Edited by Rebecca Ralls
  • 0
    Avatar
    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
    Avatar
    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
    Avatar
    Sara B

    Rebecca, was the above your final solution?

  • 0
    Avatar
    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.

Please sign in to leave a comment.