Skip to main content

Notifications

Business Central forum
Unanswered

AL Field extension scope. Initial company setup.

Posted on by 25
Hi,
Apologies if this is a real newb question but I've searched everywhere and am getting no-where.
I created a table extension called 'Web Model' on the item table. Works a treat, populates on import via config.pkg and page extension shows the value fine.
Next I tried reference that field on the Item lookup page. VS said that 'Web Model' was not part of Item table. It shows nowhere on the drop downs.
 
SO I created another field instead (see below) to copy the values over instead but however I try do do it VS still says it cannot access 'Web Model' field on Items.
Any help please?
 
Also see the fields available from Items, no mention of 'Web Model'.
 
 
Below is the definition of the 'Web Model' field:
 
tableextension 50103 "New Item Field" extends "Item"
{
    fieldstable
    {
        field(50103; "Web Model"; Code[50])
        {
            Caption = 'Web Model';
            DataClassification = ToBeClassified;
        }
    }
}
 
 
tableextension 50107 "New Web product list field" extends Item
{
    fields
    {
 
        field(50107; "Web Model Code"; Code[50])
        {
            Caption = 'Web Model';
            DataClassification = ToBeClassified;
        }
    }
}
pageextension 50107 "Field on item select" extends "Item Lookup"
{
    layout
    {
        addafter("No.")
        {
              field("Web Code"; Rec."Web Model Code")
            {
                ApplicationArea = all;
            }
        }
 
    }
}
  • YUN ZHU Profile Picture
    YUN ZHU 69,639 Super User 2024 Season 2 on at
    AL Field extension scope. Initial company setup.
    Hi, hope the following helps as well.
    How to get field values from other extensions/apps in Business Central without adding dependencies property
    https://yzhums.com/31555/
     
    PS: Business Central 2024 wave 1 (BC24): Support for multiple extensions to same target and extensions and target in same app – Define extension objects in same app as their base object
    https://yzhums.com/48766/
     
    Thanks.
    ZHU
  • gdrenteria Profile Picture
    gdrenteria 9,472 Most Valuable Professional on at
    AL Field extension scope. Initial company setup.
    Hi
    I would think that if that field is in another extension, you should add the dependency for that extension in your extension.
    You must configure the app.json file, adding the "dependencies" property
    BR
    GR

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,524 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans