← All articles · Dynamics 365 Finance · 2026-10-08 · 3087 words · by Salman Ahmad

Letters of Guarantee on Purchase Orders — Complete Guide with a Worked Example

Ad space — AdSense ready

Contents

  1. What a letter of guarantee is (commercial and finance logic)
  2. How D365 models it: requester and treasurer, the action rules
  3. Setup, A to Z (with the values used)
  4. Worked example 1 — LG 000001: request, issue, give, increase, extend, decrease
  5. Liquidation and settling the vendor invoice
  6. Worked example 2 — LG 000002: cancellation
  7. Postings per action and the totals of the example
  8. Contingent liability: where it lives and how to disclose it
  9. Pitfalls found in the run and how to avoid them
  10. Test data reference

1. What a letter of guarantee is

A letter of guarantee (LG, bank guarantee) is the bank's written promise to pay a beneficiary if its customer, the applicant, does not meet an obligation. On a purchase order the applicant is us (the buyer), the beneficiary is the vendor, and the issuer is our bank.

TypeTypical use on purchasingWho claims
Payment guaranteeVendor ships on credit; the LG guarantees we pay the invoice (used in this guide: type PayG).Vendor, when we do not pay at due date
Advance payment guaranteeWe pay an advance; the vendor's bank guarantees it back (an LG we receive, not one we issue).Us
Bid bond / performance bond / retentionDemo types BidB, PerfB, RetM exist in USMF for these.Depends on the contract

Why finance cares

No liability is booked when the LG is issued. The obligation is still the PO/invoice. The LG is a contingent liability (IAS 37 / ASC 450): disclose it, do not recognise it, until a claim becomes probable.

Cash margin. The bank blocks a percentage of the value (here 10%) from our account as collateral. It is still our money, so it moves from Bank to a margin receivable account and comes back when the LG ends.

Commissions. The bank charges issuance, increase and extension commissions. They are expenses (bank charges).

Facility limit. Each bank gives an LG line (here 1,000,000 USD). Every open LG uses part of it; ending the LG releases it.

Liquidation. If the vendor claims, the bank pays the vendor and debits us. Our debt to the vendor is then paid by the bank, so the vendor invoice must be settled against that bank payment — not paid twice (section 5).

2. How D365 models it

Two roles work on the same LG record:

RoleWhereWhat
Requester (purchaser)Purchase order > Manage > Bank document > Letter of guaranteeRequest, and request give to beneficiary / increase / decrease / extend / cancel / liquidate
TreasurerCash and bank management > Letters of guarantee > Letter of guaranteeExecutes each request: submit to bank, receive from bank (posts), give to beneficiary, increase, decrease, extend, cancel, liquidate (post)

Which button is enabled is decided by BankLGType.isActionAvailable (standard code). This is the full rule set:

ActionAllowed when LG status isFacility statusPosts?
Request (from PO)no LG yet; PO bank document type = Letter of guarantee—No
Submit to bank (treasury)RequestRequestedNo (reserves the facility)
Receive from bank (treasury)Submitted to bankRequested → OpenYes: margin + issuance commission
Request give to beneficiaryReceived from bankOpenNo
Give to beneficiary (treasury)Request give to beneficiaryOpenNo
Request increase / decrease / extend / cancel / liquidateGiven to beneficiary, Value increased, Value decreased or ExtendedOpenNo
Execute increaseRequest increase valueOpenYes: extra margin + commission
Execute decreaseRequest decrease valueOpenYes: margin released (+ commission if set)
Execute extendRequest extendOpenYes: extension commission
Execute cancelRequest cancelOpen → ClosedYes: margin released
Execute liquidateRequest liquidateOpen → ClosedYes: margin released + bank pays the value
Request extend / cancel after auto expiryany, when the expiry date has passed (auto-expired)Closed—

Rule to remember: after Receive from bank the only next step is Give to beneficiary. Cancel, extend, increase, decrease and liquidate are offered only after the LG has been given to the beneficiary (we tested: Cancel stays greyed out on a received LG).

3. Setup, A to Z

3.1 Cash and bank management parameters

Cash and bank management > Setup > Cash and bank management parameters > Bank document: turn on Enable letter of guarantee and pick the journal name used for LG postings (LGJrn).

Bank document tab: Enable letter of guarantee = Yes, transaction journal LGJrn.

Figure 1. Bank document tab: Enable letter of guarantee = Yes, transaction journal LGJrn.

Number sequences tab: letter of guarantee number and LG action number.

Figure 2. Number sequences tab: letter of guarantee number and LG action number.

3.2 Journal name LGJrn

General ledger > Journal setup > Journal names. Type Daily, voucher series for LG (LG_####), New voucher = In connection with balance.

Journal names: LGJrn (Letter of guarantee journal).

Figure 3. Journal names: LGJrn (Letter of guarantee journal).

3.3 General ledger parameter — multiple transactions per voucher

Required. Receive from bank and Increase value post the margin line and the commission line in one voucher, each with the bank account as offset (class BankLGLedgerJournalPost takes one voucher per action). With Allow multiple transactions within one voucher = No the posting fails with “Voucher LG_0002 There can only be one bank account transaction per voucher”. We set it to Yes in General ledger parameters > Ledger (D365 shows a warning that Microsoft does not recommend it; it is needed for this feature unless margin or commission is zero).

General ledger parameters: Allow multiple transactions within one voucher = Yes.

Figure 4. General ledger parameters: Allow multiple transactions within one voucher = Yes.

3.4 Facility groups and facility types

Cash and bank management > Setup > Bank documents > Bank facility. Group LG exists in USMF; we added type PayG “Payment guarantee (purchase)”, nature Letter of guarantee.

Facility groups LC / LG / IC.

Figure 5. Facility groups LC / LG / IC.

Facility types, with the new PayG line.

Figure 6. Facility types, with the new PayG line.

3.5 Posting profile (bank document posting)

Cash and bank management > Setup > Bank documents > Posting profiles. Line Table = PayG:

FieldAccount (USMF)Used by
Settle account200110Letters of credit / import collections; not used by LG postings
Bank charges618190 Bank fees expenseAll commissions
Margin132190 Prepaid other expenses (stand-in for “LG cash margin receivable”)Receive, increase, decrease, cancel, liquidate
Liquidation account200190 (stand-in for “LG liquidation clearing”)Liquidate

Do not use the AP control account as liquidation account. We first used 200110; it is blocked for manual entry, and the liquidation line was silently posted to the error account 999999 (General ledger parameters: Interrupt in case of error account = No). We reclassified it (section 5.4) and changed the line to 200190. In a real chart create dedicated accounts: LG cash margin (asset), LG liquidation clearing (liability), Bank guarantee commission (expense).

Posting profile: All line (demo) and the PayG line.

Figure 7. Posting profile: All line (demo) and the PayG line.

3.6 Bank facility agreement

Cash and bank management > Bank documents > Bank facility agreements. USMF/2026/LG01, bank account USMF OPER (USD), valid 1 Jan 2026 – 31 Dec 2027, line PayG limit 1,000,000. On the Letter of guarantee FastTab of the line: cash margin 10%, issuance 1%, extension 0.5%, increase 1%, decrease 0%.

Facility agreement with the PayG line. Amount used shows the open LG value.

Figure 8. Facility agreement with the PayG line. Amount used shows the open LG value.

Letter of guarantee FastTab: calculation method and percentage per action.

Figure 9. Letter of guarantee FastTab: calculation method and percentage per action.

The expiration date of the LG must fall inside the agreement's validity, and the currency must match the bank account, otherwise the agreement line is not offered in the lookup.

3.7 Bank reasons: purpose codes and cancellation reasons

Cash and bank management > Setup > Bank reasons. LGPAY with Purpose code ticked (it fills the Type on the request) and LGCANC with Cancellation reason ticked.

Bank reasons with the LG purpose code and cancellation reason columns.

Figure 10. Bank reasons with the LG purpose code and cancellation reason columns.

4. Worked example 1 — LG 000001 on PO 00002000

Scenario: we buy 50 × Surface Pro (item 1000) at 1,000 USD from Fabrikam Supplier (US-104) = 50,000 USD. The vendor ships on credit only against a payment guarantee.

4.1 Purchase order with bank document type

Set Bank document type = Letter of guarantee in the create dialog (or later on the header: Price and discount FastTab > Payment), add the line, then confirm the PO.

Create purchase order dialog: Bank document type = Letter of guarantee (shown on the second PO, 00002001).

Figure 11. Create purchase order dialog: Bank document type = Letter of guarantee (shown on the second PO, 00002001).

PO 00002000 line: 50 × 1,000.00 = 50,000.00.

Figure 12. PO 00002000 line: 50 × 1,000.00 = 50,000.00.

Header view: Bank document type field.

Figure 13. Header view: Bank document type field.

Confirmed PO: Manage > Bank document > Letter of guarantee.

Figure 14. Confirmed PO: Manage > Bank document > Letter of guarantee.

4.2 Request (purchaser)

Request: type LGPAY, value 50,000, expiration 31 Mar 2027.

Figure 15. Request: type LGPAY, value 50,000, expiration 31 Mar 2027.

LG 000001 created: status Request, facility status Requested, requester US-104.

Figure 16. LG 000001 created: status Request, facility status Requested, requester US-104.

4.3 Submit to bank (treasurer)

Pick the facility through the Facility type lookup — it fills bank account and agreement. Typing the value is not enough; the agreement field stays empty and the action fails with “Field 'Facility agreement' must be filled in”.

Submit to bank: agreement USMF/2026/LG01, facility type PayG, bank USMF OPER.

Figure 17. Submit to bank: agreement USMF/2026/LG01, facility type PayG, bank USMF OPER.

4.4 Receive from bank (treasurer) — first posting

D365 proposes margin 10% × 50,000 = 5,000 and issuance commission 1% = 500 (both can be overwritten with the bank's actual figures). Enter the bank's LG number.

Receive from bank: bank number BNK-LG-26-0001, margin 5,000, expense 500.

Figure 18. Receive from bank: bank number BNK-LG-26-0001, margin 5,000, expense 500.

Status Received from bank, facility Open, margin 5,000, expense 500, journal 25323.

Figure 19. Status Received from bank, facility Open, margin 5,000, expense 500, journal 25323.

Journal 25323 (LGJrn), voucher LG_0003: both lines offset to bank USMF OPER.

Figure 20. Journal 25323 (LGJrn), voucher LG_0003: both lines offset to bank USMF OPER.

AccountNameDebitCredit
618190Bank fees expense — issuance commission500.00
132190LG cash margin5,000.00
110110Bank USMF OPER5,500.00

Voucher LG_0003. Facility USMF/2026/LG01 amount used: 50,000. The 50,000 guarantee itself is not posted.

4.5 Give to beneficiary

Purchaser requests it, treasurer executes it (no posting). From now on the other actions are available.

Status Request give to beneficiary (purchaser side).

Figure 21. Status Request give to beneficiary (purchaser side).

Status Given to beneficiary (treasury).

Figure 22. Status Given to beneficiary (treasury).

4.6 Increase value by 10,000

Request increase: value to add 10,000.

Figure 23. Request increase: value to add 10,000.

Execute: margin 1,000 (10% of 10,000) and commission 600.

Figure 24. Execute: margin 1,000 (10% of 10,000) and commission 600.

Observed: the increase commission was 600 = 1% of the new total 60,000, not of the 10,000 added. Check this against your bank's tariff and overwrite the amount in the dialog if the bank charges on the increment.

AccountNameDebitCredit
618190Increase value commission600.00
132190LG cash margin1,000.00
110110Bank USMF OPER1,600.00

Voucher LG_0004. LG value 60,000; facility used 60,000.

4.7 Extend to 30 Jun 2027

Request extend: new expiration date.

Figure 25. Request extend: new expiration date.

Execute: extension commission 300 (0.5% of 60,000).

Figure 26. Execute: extension commission 300 (0.5% of 60,000).

AccountNameDebitCredit
618190Extension commission300.00
110110Bank USMF OPER300.00

Voucher LG_0005.

4.8 Decrease value by 10,000

Execute decrease: margin 1,000 released, commission 0.

Figure 27. Execute decrease: margin 1,000 released, commission 0.

AccountNameDebitCredit
110110Bank USMF OPER1,000.00
132190LG cash margin1,000.00

Voucher LG_0006. LG value back to 50,000; facility used 50,000.

5. Liquidation and settling the vendor invoice

The goods arrive, the invoice is posted, we do not pay at due date, and the vendor claims the guarantee.

5.1 Product receipt and vendor invoice (normal AP)

Vendor invoice INV-FAB-LG-001 for 50,000 (run Update match status before posting).

Figure 28. Vendor invoice INV-FAB-LG-001 for 50,000 (run Update match status before posting).

AccountNameDebitCredit
Inventory / receipt accrualper item posting50,000.00
200100Accounts payable (vendor US-104)50,000.00

Voucher PIV-110001001. The vendor balance is open.

5.2 Liquidate (purchaser requests, treasurer executes)

Status Request liquidate.

Figure 29. Status Request liquidate.

Execute liquidate: value 50,000, margin 5,000 comes back.

Figure 30. Execute liquidate: value 50,000, margin 5,000 comes back.

LG 000001: status Liquidated, facility Closed; facility used drops to 0.

Figure 31. LG 000001: status Liquidated, facility Closed; facility used drops to 0.

Journal 25327, voucher LG_0007: margin release and liquidation, both against the bank.

Figure 32. Journal 25327, voucher LG_0007: margin release and liquidation, both against the bank.

AccountNameDebitCredit
110110Bank USMF OPER — margin released5,000.00
132190LG cash margin5,000.00
200190LG liquidation clearing50,000.00
110110Bank USMF OPER — bank paid the vendor50,000.00

Commercial meaning: the bank used the 5,000 margin and 45,000 of our own funds to pay the vendor 50,000. In the books the margin returns to the bank account and the full 50,000 leaves it; the debit sits on the clearing account until it is matched with the vendor invoice.

5.3 Settle the vendor invoice against the liquidation

The vendor has been paid by the bank, so the invoice must be closed without a second bank payment. Use a vendor payment journal (or general journal) line: Debit vendor, credit the liquidation clearing account, and settle the invoice.

Offset account type Ledger, offset account 200190 (the liquidation account). Method of payment blank — CHECK/ELECTRONIC require a bank offset (“Offset account must have the type bank…”, “Check number must be filled in…”). Settle transactions: mark the invoice, Use cash discount = Never (the bank paid after the discount date; a 1% discount was proposed by default).

Settle transactions: INV-FAB-LG-001 marked, cash discount Never, settlement balance 0.

Figure 33. Settle transactions: INV-FAB-LG-001 marked, cash discount Never, settlement balance 0.

Payment journal 25329: Debit US-104 50,000, offset Ledger 200190.

Figure 34. Payment journal 25329: Debit US-104 50,000, offset Ledger 200190.

Posted: invoice and payment closed on 7 Oct 2026.

Figure 35. Posted: invoice and payment closed on 7 Oct 2026.

AccountNameDebitCredit
200100Accounts payable (US-104)50,000.00
200190LG liquidation clearing50,000.00

Voucher APPM001218. VENDTRANS: invoice PIV-110001001 and payment APPM001218 both settled 50,000 and closed. Clearing account 200190 nets to zero.

5.4 If the liquidation went to the error account

Our first liquidation used 200110 (AP control, blocked for manual entry), so GL posted it to 999999. Fix with a general journal and correct the posting profile:

General journal 25328: reclass 50,000 from 999999 to 200190.

Figure 36. General journal 25328: reclass 50,000 from 999999 to 200190.

AccountNameDebitCredit
200190LG liquidation clearing50,000.00
999999Error account50,000.00

Voucher GNJL001103.

5.5 If the invoice was already paid normally

If AP had already paid the vendor and the bank also paid under the guarantee, the vendor was paid twice: keep the 50,000 on the clearing account, raise a debit note / claim on the vendor (Dr vendor, Cr clearing) and settle the vendor refund against it.

6. Worked example 2 — LG 000002 cancelled

PO 00002001 (20 × 1,000 = 20,000) with an LG of 20,000 expiring 31 Dec 2026. The deal no longer needs the guarantee; the vendor returns the original.

LG 000002 requested from PO 00002001.

Figure 37. LG 000002 requested from PO 00002001.

Received from bank: margin 2,000, issuance commission 200.

Figure 38. Received from bank: margin 2,000, issuance commission 200.

Request cancel with cancellation reason LGCANC (after give to beneficiary).

Figure 39. Request cancel with cancellation reason LGCANC (after give to beneficiary).

Execute cancel: margin 2,000 comes back.

Figure 40. Execute cancel: margin 2,000 comes back.

LG 000002: status Cancelled, facility status Closed, reason LGCANC.

Figure 41. LG 000002: status Cancelled, facility status Closed, reason LGCANC.

AccountNameDebitCredit
618190Issuance commission200.00
132190LG cash margin2,000.00
110110Bank USMF OPER2,200.00

Receive — voucher LG_0008.

AccountNameDebitCredit
110110Bank USMF OPER2,000.00
132190LG cash margin2,000.00

Cancel — voucher LG_0009. Commission is not refunded.

7. Postings per action and totals of the example

ActionDebitCreditFacility
Submit to bankno postingreserved
Receive from bankMargin; Bank chargesBank (each line)used + value
Give to beneficiaryno posting—
Increase valueMargin; Bank chargesBankused + increase
Decrease valueBank; Bank charges (if any)Margin; Bankused − decrease
ExtendBank chargesBank—
CancelBankMarginreleased, closed
LiquidateBank (margin); Liquidation accountMargin; Bank (value)released, closed

Totals of LG 000001 (from AxDB, journals 25323–25329):

AccountMovementMeaning
618190 Bank fees1,400.00 Dr500 issuance + 600 increase + 300 extension
132190 LG margin0.005,000 + 1,000 − 1,000 − 5,000
110110 Bank51,400.00 Cr50,000 paid to vendor + 1,400 commissions
200190 Liquidation clearing0.00+50,000 liquidation − 50,000 settlement
200100 AP (US-104)0.00invoice 50,000 settled by the bank's payment

8. Contingent liability: where it lives

D365 does not post the guarantee value. The open exposure is held in three places:

Disclosure. For the financial-statement note, report open LGs (value, beneficiary, expiry) from the LG list or an export. Companies that want the exposure in the trial balance use memo (off-balance) accounts with a manual general journal: Dr Contingent asset – guarantees issued (memo) / Cr Contingent liability – guarantees issued (memo) on issue, and the reverse on cancel, liquidation or expiry. Both accounts are excluded from the statements. They were not created in this run: main accounts live in the shared chart of accounts.

When it becomes a real liability: once the vendor's claim is probable and the amount is known, the obligation is recognised — in D365 that is the moment of Liquidate (debit liquidation account, credit bank).

9. Pitfalls found in the run

SymptomCauseFix
“There can only be one bank account transaction per voucher” on Receive from bankMargin and commission post in one voucher with bank offsetsGeneral ledger parameters: Allow multiple transactions within one voucher = Yes
Liquidation lands on 999999Liquidation account blocked for manual entry (AP control)Use a dedicated clearing account; reclass with a general journal
“Field 'Facility agreement' must be filled in” on Submit to bankFacility typed, not pickedPick it in the Facility type / Bank account lookup
Cancel / Extend / Increase greyed outLG not yet given to beneficiaryRequest + execute Give to beneficiary first
Letter of guarantee button greyed out on the POBank document type not set, or PO not confirmedSet the type, confirm the PO
Payment journal: “Offset account must have the type bank”Method of payment CHECK on a ledger offsetLeave method of payment blank for the clearing settlement
Settlement takes a 1% discountDefault Use cash discount = NormalSet Never on the marked invoice
Changing the PO line warehouse asks to overwrite pricesPrice/discount re-searchUntick Unit price in the dialog to keep the agreed price; reconfirm the PO

10. Test data reference (USMF)

ItemValue
Facility type / agreementPayG · USMF/2026/LG01 (USMF OPER, limit 1,000,000)
Bank reasonsLGPAY (purpose code), LGCANC (cancellation reason)
Posting profile lineTable PayG: charges 618190, margin 132190, liquidation 200190
Parameters changedEnable letter of guarantee = Yes; GL “Allow multiple transactions within one voucher” = Yes
LG 000001PO 00002000 · US-104 · bank no. BNK-LG-26-0001 · liquidated · journals 25323–25327
Vendor invoice / receiptINV-FAB-LG-001 (PIV-110001001) · PR-LG-0001 · settled by payment journal 25329 (APPM001218)
ReclassGeneral journal 25328 (GNJL001103), 999999 → 200190
LG 000002PO 00002001 · bank no. BNK-LG-26-0002 · cancelled (LGCANC) · journals 25330–25331

Reference: Microsoft Learn — “Letters of guarantee” (Cash and bank management).

Ad space — AdSense ready