How to Move fields in Page via AL Extension in D365 BC

Move fields in Page via AL Extension:

Case I- Move Before:

(1) Syntax : “movebefore(Anchor; Target1, Target2)”. Lets take an example, move field “Unit Price” before “HSN/SAC code”.

  • Anchor: controls, actions, and groups.
  • Target: list of actions or list of controls.

(2) Source Code:

pageextension 50001 SalesOrderSubFormExt extends “Sales Order Subform”
{
    layout
    {
       
        movebefore(“GST Group Code”; “Unit Price”)
    }
}
move field Unit Price before HSN/SAC code

(3) Publish the extension and see the effect in below image-

move field before in businesss central

Case II- Move After:

(1) Syntax : “moveafter(Anchor; Target1, Target2)”. Lets take an example, move field “Unit Price” after “HSN/SAC code”.

  • Anchor: controls, actions, and groups.
  • Target: list of actions or list of controls.

(2) Source Code:

pageextension 50001 SalesOrderSubFormExt extends “Sales Order Subform”
{
    layout
    {
       
        moveafter(“GST Group Code”; “Unit Price”)
    }
}
move field “Unit Price” after “HSN/SAC code”.

(3) Publish the extension and see the effect in below image-

move field after in businesss central

Viewing Table data directly from the Web Client in D365 BC
How to change Caption or Name of existing Field in D365 BC
How to add or show new field in existing Page in D365 BC
Page Extension Object– Microsoft Docs

Leave a Reply