Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Can't add action to posted invoice list or posted invoice page

(0) ShareShare
ReportReport
Posted on by 308
Hey Everyone:
 
I'm having an issue where no matter what I try, I cannot seem to get an action onto the Posted Sales Invoice list, or the Posted Sales Invoice page.  I have a page extension object which adds fields to both of these and I've tried code to add an action that I want to undertake, but nothing is working.  It seems that these pages operate under slightly different principles than I'm accustomed to.  As an example, here's the code that I'm using:
 
    actions
    {
        addafter(Customer)
        {
            action(UpdateStatus)
            {
                Caption = 'Update Status';
                ToolTip = 'Sends message to update the status of the document';
                ApplicationArea = All;
                Image = VendorPayment;
                Visible = true;
 
                trigger OnAction()
                begin
                    Message('Not yet implemented');
                end;
            }
        }
        addafter(Customer_Promoted)
        {
            actionref(UpdateStatus_Promoted; UpdateStatus)
            {
            }
        }
    }
The issue is that nothing will appear under any of the areas that I choose.  I've tried multiple variants, and I'm wondering if anyone has come across this before, and perhaps could point me the right way?  I'm trying to insert onto page 132 (Posted Sales Invoice) or page 143 (Posted Sales Invoices) and neither seem to accept my attempts.
 
Thank you in advance.
-J
 
[edit: formatting]
[edit: I really hate the formatting for code on this site]
  • Suggested answer
    James McCullough Profile Picture
    James McCullough 308 on at
    Can't add action to posted invoice list or posted invoice page
    Scratch all of the above.
     
    The issue is that - since I'm developing in multiple profiles at the same time - the profile that was publishing was publishing to one tenant, and the launch was going to another.  I'll call this PEBCAK and go lick my wounds.  Thanks to everyone who read this.
  • James McCullough Profile Picture
    James McCullough 308 on at
    Can't add action to posted invoice list or posted invoice page
    Whoa!  I just switched my compiler to the pre-release and it worked!   I think something's wrong with the most recent compiler...
  • James McCullough Profile Picture
    James McCullough 308 on at
    Can't add action to posted invoice list or posted invoice page
    Hey Everyone:
     
    Some further information: I've been unable to replicate even the example on the "Page Extension Object" version on MS Learn.  Can anyone confirm for me please whether there's a problem with VS Code / AL / Business Central right now?  My AL module JUST updated and everything's been acting "weird" ever since.  (Things like the symbol files won't open, or open to blank screens making me restart VS Code, or compiling and uploading just .. fails.  And then works.)
     
    Thanks.
    -J
     

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! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,605 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans