Deferral accounts, or Prepaid expenses accounts, as defined by Larson, Jensen and Carroll(2002) are asset accounts. These deferral accounts contain payments made for assets to be used in the near future. As these assets are used up, the costs of the used assets become expenses.
AccountingCoach.com website points out the difference between accruals and deferrals: “an accrual occurs before a payment or receipt. A deferral occurs after a payment or receipt. There are accruals for expenses and for revenues. There are deferrals for expenses and for revenues”.
A few examples where deferrals are usually employed are Office Supplies, Prepaid Insurance, Prepaid Rent, Tax Registration for cars in countries like Denmark or Singapore.
With NAV 2016, Microsoft allowed users to automate the process of deferring not only the expenses, but also the revenue over a pre-defined schedule. To set-up a deferral code is fairly easy. Just type: Deferral in the Search field in RTC, and launch Deferral Template List page. I will go into creating a deferral code a bit later in this article.
Accounting perspective
Let’s consider this leasing car example, in which an accounting employee at Goldman Bags Bank – Danish subsidiary – is recording an invoice for customer Henrik Jensen for the Danish registration tax for his newly acquisitioned Mercedes SLC, which amounts for 30,000.00 DKK payable in 6 months. The deferral schedule with the 6 monthly adjustments should look like below:

How would this use case be applied in NAV?
NAV 2016 RTC
- Create a 6 months deferral code

- Open General Journal and post the transactions below(note the deferral code on the second transaction):

Alternatively you could assign Deferral Code = ‘Leasing’ to the G/L account 86000 by opening G/L Account card and filling up “Default Deferral Template” with the desired deferral code in which case the Deferral Code will be automatically populated in the Gen. Journal Line.
- Open the General Ledger Entries to check the effect of the 2 transactions posted above (filter by Document No. and sort by Entry No.):

Each month-end a deferred 5,000.00 DKK will be applied against G/L Account 86000. In the contra account(86100) an equal and opposite sign amount will get posted each month end.
What about my processes? How can I automate my processes to post to deferral accounts via C/AL code?
First, let’s look into how Microsoft implemented invoices with sales lines defined with deferral codes.
Microsoft implementation of Deferrals in Sales Invoices
In CU80, at the end of FillInvPostingBuffer we find the following code snippet:

The highlighted method will populate buffers for 1701 (Deferral Header), 1702 (Deferral Line) and 1703(Deferral Post. Buffer), buffers that will be used by codeunit 12 to validate and post these buffers.
When coming in Codeunit 12, Sourcecode = Sale, therefore, the Deferral Post. Buffer(record 1703) is ready and will be processed as part of PostDeferralPostBuffer.
When coming from the General Journal, PostDeferral method will process 1701 and 1702 records to create deferred general ledger entries:

Custom Deferral Posting:
For your customized processes, it is not enough to generate a general journal line and post it.
Below is an easy to follow template for injecting deferrals in your business processes:
- populate the General Journal Line fields
- “General Journal Line”.”Deferral Code” should be validated against the “Default Deferral Template Code”(if not empty) of G/L Account recorded in “General Journal Line”.”G/L Account No.”.
- If “General Journal Line”.”Deferral Code” <> ” , you need to use something similar to what Microsoft did with the sales invoices:
- populate deferral records(1701,1702)
- populate deferral buffer(1703)
- now everything is ready for processing and posting – in a similar fashion as it takes place with Sales Invoices with deferrals- as part of the Codeunit 12 RunWithCheck() method

Some code to get you started here.
References:
AccountingCoach. What is the difference between an accrual and a deferral [blog post]. Retrieved from http://www.accountingcoach.com/blog/accrual-deferral
Larson K., Jensen T., Carroll R. 2002. “Financial Accounting Principles” Tenth Canadian Edition (p.141)
Totovic.(September 10, 2015) How deferrals work in NAV 2016[Blog post]. Retrieved from https://totovic.com/2015/10/09/how-deferrals-works-in-nav-2016/