Skip to main content

Notifications

Business Central forum
Suggested answer

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

Posted on by 290
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]
Categories:
  • Suggested answer
    James McCullough Profile Picture
    James McCullough 290 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 290 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 290 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
     

Helpful resources

Quick Links

Dynamics 365 Community Update

Welcome to the inaugural Community Platform Update. As part of our commitment to…

Dynamics 365 Community Newsletter - August 2024

Catch up on the latest D365 Community news

Community Spotlight of the Month

Kudos to Mohana Yadav!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 227,971 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans