---
id: post/mohana-blog/tag-blogger-com-1999-blog-1492436440038408053-post-1160169849126032090--7f7e64325d
type: post
title: Why API Templates Don't Work on Business Central Custom API Pages
summary: API templates in Business Central only work with specific standard API pages because custom API pages lack the ProcessNewRecordFromAPI function call in their OnInsertRecord trigger. To make templates work on custom API pages, you must add this function call and register fields using the TempFieldSet mechanism.
tier: community
language: en
tags:
  - api templates
  - custom api pages
  - oninsertrecord trigger
  - field registration
  - configuration templates
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-08T01:56:40.475Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 518e4243233df53ef6c0811bad13a8862a1e5b1cd9e783d84bb149b35e69544b
evidence:
  - kind: blog
    url: http://mohana-dynamicsnav.blogspot.com/2026/02/why-api-templates-dont-work-on-business.html
    title: Why API Templates Don't Work on Business Central Custom API Pages
    date: "2026-02-28"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: http://mohana-dynamicsnav.blogspot.com/2026/02/why-api-templates-dont-work-on-business.html
    title: Why API Templates Don't Work on Business Central Custom API Pages
    date: "2026-02-28"
    commit: null
    t: null
    quote: "API templates can only be set up with the following API pages: contacts, countriesRegions, currencies, customers, employees, itemCategories, paymentMethods, paymentTerms, shipmentMethods, unitsOfMeasure, and vendors."
  - kind: blog
    url: http://mohana-dynamicsnav.blogspot.com/2026/02/why-api-templates-dont-work-on-business.html
    title: Why API Templates Don't Work on Business Central Custom API Pages
    date: "2026-02-28"
    commit: null
    t: null
    quote: Without it, the framework has no hook to do anything. The template gets ignored completely.
  - kind: blog
    url: http://mohana-dynamicsnav.blogspot.com/2026/02/why-api-templates-dont-work-on-business.html
    title: Why API Templates Don't Work on Business Central Custom API Pages
    date: "2026-02-28"
    commit: null
    t: null
    quote: The API caller always wins. ProcessNewRecordFromAPI only applies a template value if that field is not already in TempFieldSet.
links:
  learn: []
  objects:
    - object/page/5469
    - object/codeunit/5465
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: tag:blogger.com,1999:blog-1492436440038408053.post-1160169849126032090
source_id: mohana-blog
source_name: Mohana's Dynamics NAV & BC blog
url: http://mohana-dynamicsnav.blogspot.com/2026/02/why-api-templates-dont-work-on-business.html
published_at: "2026-02-28T06:40:00.000Z"
author: Mohana Yadav
full_text: false
words: 1156
quotes:
  - text: "API templates can only be set up with the following API pages: contacts, countriesRegions, currencies, customers, employees, itemCategories, paymentMethods, paymentTerms, shipmentMethods, unitsOfMeasure, and vendors."
    why_it_matters: Establishes the strict limitation that only these 11 standard pages support API templates, setting expectations for what configurations are possible.
  - text: Without it, the framework has no hook to do anything. The template gets ignored completely.
    why_it_matters: Explains the root cause of why custom API pages don't support templates - the missing ProcessNewRecordFromAPI function call is the critical infrastructure piece.
  - text: The API caller always wins. ProcessNewRecordFromAPI only applies a template value if that field is not already in TempFieldSet.
    why_it_matters: Clarifies the priority system for template application, ensuring explicit API values are never overwritten by templates.
code_objects_mentioned:
  - api contacts
  - api countriesRegions
  - api currencies
  - api customers
  - api employees
  - api itemCategories
  - api paymentMethods
  - api paymentTerms
  - api shipmentMethods
  - api unitsOfMeasure
  - api vendors
  - page API Setup
  - codeunit Graph Mgt - General Tools
  - table Field
systems:
  - integration
  - administration
versions_mentioned: []
preview:
  embeddable: true
  frame_url: null
  image: https://blogger.googleusercontent.com/img/a/AVvXsEhw71t-QWEpBd_3wAat9AGn1lCVmBS3xOjTt8OcpX15j9YqLnUsV9WvUKvoptet4PRztLcj_6mijmRC0r-Y6xKwUcphcWwkf64BhIyIfqDTmmRNeN83A4RFNab4N64lLHic44-jmgeXjWj5armNWFoclmocTkbVwpraLeddDzwv-Y4-okhv484XWcUAyQKN=w1200-h630-p-k-no-nu
  image_alt: null
  image_w: null
  image_h: null
  site_name: null
  favicon: https://mohana-dynamicsnav.blogspot.com/favicon.ico
  probed_at: "2026-10-07T11:50:47.690Z"
---

# Why API Templates Don't Work on Business Central Custom API Pages

[Read the post](http://mohana-dynamicsnav.blogspot.com/2026/02/why-api-templates-dont-work-on-business.html) · Mohana's Dynamics NAV & BC blog (Mohana Yadav) · 2026-02-28 · 1156 words · tier community · reviewed (checked by Opus)

> API templates in Business Central only work with specific standard API pages because custom API pages lack the ProcessNewRecordFromAPI function call in their OnInsertRecord trigger. To make templates work on custom API pages, you must add this function call and register fields using the TempFieldSet mechanism.

## Key points

- API templates are built-in configuration features that pre-populate fields on new records created via API POST calls, but only 11 standard pages support them out of the box.
- Custom API pages and the Resource API page don't have the required ProcessNewRecordFromAPI function hook in their OnInsertRecord trigger, so templates are completely ignored.
- To enable templates on custom API pages, add GraphMgtGeneralTools.ProcessNewRecordFromAPI to the OnInsertRecord trigger and register each field using the TempFieldSet temporary record.
- API caller values always take priority over template values; template fields only apply to fields not explicitly provided in the API request or already set by an earlier template.
- The TempFieldSet record tracks which fields were explicitly set in the API call, preventing templates from overwriting intentional caller-provided values.

## Quotes

- "API templates can only be set up with the following API pages: contacts, countriesRegions, currencies, customers, employees, itemCategories, paymentMethods, paymentTerms, shipmentMethods, unitsOfMeasure, and vendors." (Establishes the strict limitation that only these 11 standard pages support API templates, setting expectations for what configurations are possible.)
- "Without it, the framework has no hook to do anything. The template gets ignored completely." (Explains the root cause of why custom API pages don't support templates - the missing ProcessNewRecordFromAPI function call is the critical infrastructure piece.)
- "The API caller always wins. ProcessNewRecordFromAPI only applies a template value if that field is not already in TempFieldSet." (Clarifies the priority system for template application, ensuring explicit API values are never overwritten by templates.)

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- api "contacts"
- api "countriesRegions"
- api "currencies"
- api "customers"
- api "employees"
- api "itemCategories"
- api "paymentMethods"
- api "paymentTerms"
- api "shipmentMethods"
- api "unitsOfMeasure"
- api "vendors"
- [page 5469 "API Setup"](../../objects/page/5469.md)
- [codeunit 5465 "Graph Mgt - General Tools"](../../objects/codeunit/5465.md)
- table "Field"

Not found in BC28-30: table "Field".

## Context

- Features: API templates, Configuration templates, OnInsertRecord trigger, ProcessNewRecordFromAPI function, TempFieldSet tracking, Field registration, Custom API pages, API field priority

Source: Mohana's Dynamics NAV & BC blog, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
