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): Adjust width of Copilot, help, and page scripting panes

Hi, Readers.The public preview for Dynamics 365 Business Central 2025 release wave 2 (BC27) is available. Learn more: Link. I will contin...

22 hours ago

Dynamics 365 Business Central Blog Series: TableRelation

Articles in this series: TableRelation, Enum/Option, Lookup and AssistEdit – What’s the difference on the page (UI) TableRelation, Enum/Option...

1 day ago

Business Central 2025 wave 2 (BC27): Configure the default calculation for the Calculate Consumption report (Default Consumption Calculation Based on)

Hi, Readers.The public preview for Dynamics 365 Business Central 2025 release wave 2 (BC27) is available. Learn more: Link. I will contin...

4 days ago

Business Central 2025 wave 2 (BC27): RecordRef – Get/Search field by name (New overloads)

Hi, Readers.The public preview for Dynamics 365 Business Central 2025 release wave 2 (BC27) is available. Learn more: Link. I will contin...

5 days ago

Business Central 2025 wave 2 (BC27): Update sandbox environments to preview versions

Hi, Readers.The public preview for Dynamics 365 Business Central 2025 release wave 2 (BC27) is available. Learn more: Link. I will contin...

5 days ago

Fixing the Error: “An error occurred while applying designer changes. Please try again.” in Microsoft Dynamics Business Central

If you’ve been working in Microsoft Dynamics 365 Business Central and encountered the frustrating message: “An error occurred while applying d...

6 days ago

Business Central 2025 wave 2 (BC27): New values (AsReadOnly & AsReadWrite) for the AllowInCustomizations property

Hi, Readers.The public preview for Dynamics 365 Business Central 2025 release wave 2 (BC27) is available. Learn more: Link. I will contin...

6 days ago

Business Central 2025 wave 2 (BC27): Add more fields and columns by personalizing pages

Hi, Readers.The public preview for Dynamics 365 Business Central 2025 release wave 2 (BC27) is available. Learn more: Link. I will contin...

6 days ago

Business Central 2025 wave 2 (BC27): Use enhanced chat with Copilot (Supports 20 more languages)

Hi, Readers.The public preview for Dynamics 365 Business Central 2025 release wave 2 (BC27) is available. Learn more: Link. I will contin...

7 days ago

Cumulative Update Summary for Microsoft Dynamics 365 Business Central (September, 2025)

Cumulative Update (September, 2025) for Microsoft Dynamics 365 Business Central is now released. BC27: Public Preview The public preview for D...

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