Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

Created a Card Page When I Should Have Created a List Page

(0) ShareShare
ReportReport
Posted on by 3,482

Hi:

I'm testing AL code in a sandbox environment.  I made a simple, yet frustrating, mistake.

For the "PageType" code, I should have typed "= List;".  Instead, I typed "=Card;".

I had already published the code, before I realized the mistake.

Afterward, I changed the code to be "PageType = List;".

Unfortunately in Business Central, the page is still a card and not a list.

How do I delete the card page and republish this code, so that a list page is created?

Thanks!

John

  • john.ellis Profile Picture
    john.ellis 3,482 on at
    RE: Created a Card Page When I Should Have Created a List Page

    That was it!  Thank you, Yun Zhu!

    John

  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 75,673 Super User 2024 Season 2 on at
    RE: Created a Card Page When I Should Have Created a List Page

    Hi, It looks like you only revised the page type, but did not add a repeater group.

    A simple Example of a list page:

    pastedimage1634082286810v1.png

    Hope this will help.

    Thanks.

    ZHU

  • Samantha73 Profile Picture
    Samantha73 2,484 on at
    RE: Created a Card Page When I Should Have Created a List Page

    Might be a refresh issue or caption ..

    couple of things you can try:

    1.restart everything - not sure on prem or SaaS. publish to new sandbox

    2. Add obvious caption like Caption = 'TEST1 John';

  • john.ellis Profile Picture
    john.ellis 3,482 on at
    RE: Created a Card Page When I Should Have Created a List Page

    Hi Samantha73:

    Actually, in the last few moments, I found a way to delete the page.  You simply delete your code in Visual Studio Code and run "AL: Publish without debugging".

    That got me back to square one.  Good.

    But, after going through that experiment, AL still wants to create the List Page as a Card!

    I tried everything.  I even gave the code a new ID number and name.  But, still, when I pull up the page, it's a Card Page instead of a List Page.

    Ugh!!!!  I don't get it.

    Below is my code, in case you have any ideas.  Anything would be appreciated.

    Thanks, for the quick response!

    John

    page 50140 "Date Formula"

    {

       PageType = List;

       ApplicationArea = All;

       UsageCategory = Administration;

       SourceTable = "Date Formula";

       layout

       {

           area(Content)

           {

               group(GroupName)

               {

                   field("Primary Key"; "Primary Key") { ApplicationArea = All; }

                   field("Reference for Date Calculation"; "Reference for Date Calculation") { ApplicationArea = All; }

                   field("Date Formula to Test"; "Date Formula to Test") { ApplicationArea = All; }

                   field("Date Result"; "Date Result") { ApplicationArea = All; }

               }

           }

       }

    }

  • Samantha73 Profile Picture
    Samantha73 2,484 on at
    RE: Created a Card Page When I Should Have Created a List Page

    John - Have you tried publishing with "schemaUpdateMode": "ForceSync" .  Only works on Sandbox currently v18

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,661 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,379 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans