Loading...

How to set focus on fields using Javascript in Business Central

How to set focus on fields using Javascript in Business Central
Heres an example of how to set field focus in Business Central using one line of Javascript. Setting focus on fields can be useful for example when using barcode scanners or doing some other quick data entry. This example extends sales order lines and after entering the Item No. focuses on Quantity and after quantity focuses on Unit Price etc. Al Code: pageextension 50100 "Ext. Sales Order Subform" extends "Sales Order Subform" { layout { addlast(content) { usercontrol(SetFieldFocus; SetFieldFocus) { ApplicationArea = All; trigger Ready() begin CurrPage.

Published on:

Learn more
Posts on Microsoft Dynamics 365 Business Central Development
Posts on Microsoft Dynamics 365 Business Central Development

Recent content in Posts on Microsoft Dynamics 365 Business Central Development

Share post:

Related posts

Business Central 2025 wave 2 (BC27): Install UK localization as an extension to the base app (UK Delocalization)

Hi, Readers.Dynamics 365 Business Central 2025 wave 2 (BC27) is generally available. More details: General Available: Dynamics 365 Busine...

29 minutes ago

Dynamics 365 Business Central: How to check whether the current page/report is standard or customized

Hi, Readers.Today I would like to share another mini tip about Business Central, how to check whether the current page is standard or customiz...

22 hours ago

Dynamics 365 Business Central Blog Series: Date and time handling

Articles in this series: How to use Date and Time Functions (Get Today, Yesterday, Tomorrow, First and Last day of the month…) How to use Date...

2 days ago

Dynamics 365 Business Central: How to check if the time zone supports daylight saving time (DST) via AL

Hi, Readers.Today I would like to share another mini tip about Business Central, how to check if the time zone supports daylight saving time (...

4 days ago

Dynamics 365 Business Central: Adding comments to Factbox/Report (Displaying Comments in a FactBox/Report)

Hi, Readers.Last week we briefly discussed how to add Notes (System Parts) from FactBox to a report. Later I received some feedback that it mi...

5 days ago

Dynamics 365 Business Central: How to add or subtract hours from a DateTime field

Hi, Readers.Today I would like to share another mini tip about Business Central, how to add or subtract hours from a DateTime field. Date...

6 days ago

Dynamics 365 Business Central: Analyzing performance issues using the page inspector

Hi, Readers.Today I would like to share another mini tip about Business Central, how to analyze performance issues using the page inspect...

7 days ago

Cumulative Update Summary for Microsoft Dynamics 365 Business Central (January, 2026)

Cumulative Update (January, 2026) for Microsoft Dynamics 365 Business Central is now released. BC27: CU03 Cloud (SaaS): Managing Production an...

9 days ago

Dynamics 365 Business Central: How to get the Month Name/Text from a date (Two ways)

Hi, Readers.Today I would like to share another mini tip about Business Central, how to get the Month Name/Text from a date. For example,...

11 days ago

Dynamics 365 Business Central: Add a Scan Barcode action and scan multiple/Continious scanning (Invoke barcode scanning programmatically from AL)

Hi, Readers.Today I would like to talk about how to add a Scan Barcode action and scan multiple/Continious scanning in Business Central S...

12 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy