web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Business Central forum

modify action name in Business Central

(0) ShareShare
ReportReport
Posted on by 30

I tried to modify the caption of action like below using Visual Code AL, but It doesn't work as expected. And also how can I add new icon to the Business Central on Cloud if I want to change the icon for the Bank Accounts that in yellow circle?

Can I get some example of the code to change the Customer and Bank Accounts?

Thanks

I tried to modify the field, but it doesn't work for actions. The code I tried:

pageextension 50100 DemoAddFieldCardExt extends "Customer Card"
{actions
{
// Add changes to page actions here
modify(Customer)
{
CaptionML = ENU = 'Students';
}
}

}

  • Suggested answer
    Genie Cetas Profile Picture
    472 on at
    Hope this will help you.
    pageextension 50105 CustExt extends "Customer Card"
    {
    actions
    {
    // Add changes to page actions here
    modify(Contact)
    {
    Caption = 'Customer Contact';

    }

    }
    }
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    FYI the support for using ML properties (CaptionML and TooltipML) is deprecated. This means you Should use Caption instead of CaptionML and tooltip instead of tooltipML.

    the best way to do that is writing

    caption = 'Students';

    --

    Best Regards,

  • Blide12 Profile Picture
    30 on at

    HI, I this is my sample code on modify the caption, but the problem is I can change and add field but when for the action, it doesn't change anything.

    pageextension 50100 DemoAddFieldCardExt extends "Customer Card"

    {

       layout

       {

           addlast(General)

           {

               field("My Option"; "Option Field")

               {

                   ApplicationArea = All;

               }

           }

           modify(Blocked)

           {

               Caption = 'Blocking';

           }

       }

       actions

       {

           // Add changes to page actions here

           modify(Contact)

           {

               Caption= 'Test Action';  

           }

       }

    }

    This is the screenshot of the result

    6685.Untitled.png

    The code supposed to change "Contact" into "Student" but it still show up as "Contact". I am able to change the "Blocked" into "Blocking" so I am not extending the wrong page. So is there any problem with the code ?

  • Verified answer
    Community Member Profile Picture
    on at

    Hi,

    Well I tried this code:

    pageextension 50010 MyExtension extends "Customer Card"
    {
    
        actions
        {
            // Add changes to page actions here
            modify(Contact)
            {
                Caption = 'Test Action';
    
            }
        }
    
    }


    and it is changed to Test Action as you can see in the attached image :

    2627.action.png

    This means that it is working fine.  I don't really know why it doesn't work for you !!

    I don't know but perhaps try to Reset your sandbox !

    -----

    Best Regards,

  • Blide12 Profile Picture
    30 on at

    After I reset my sandbox, I cannot reach my sandbox and got this error instead

    1651.Untitled.png

    What might cause this?

  • Suggested answer
    Community Member Profile Picture
    on at

    Try to Publish directly from VS code (F5 key) and specify in your launch.json :

           "startupObjectId": 22,
           "startupObjectType": "Page",

    This will publish your extension and open your sandbox without errors. You can change your Browser as well (use MS Edge fro example).

    This is usually a problem from Microsoft servers side (after the last release some clients have problems creating and resetting their Sandboxes).

    -------------

    Please verify my answer if you find my answer helpful. Doing so you'll show other community members that there was found a solution and you credit my help.

    -------------

    Best Regards,

  • Suggested answer
    Community Member Profile Picture
    on at

    You can also if it doesn't work check in the Administration Center if it is created, if not create it with the link in the dashboard.

    Here is a link where you can find more details and where you have a link to access directly your BC Administration Center:

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/tenant-admin-center

    ---

    Best Regards,

  • Verified answer
    Community Member Profile Picture
    on at

    Hi again,

    Well this is the best response on the last error you got by a guy from Microsoft:

    https://community.dynamics.com/business/f/758/t/304195

    It explains why you get the error sometimes when you reset sandbox and how to overcome it (the same thing I suggested before + he suggest delete cookies / History and try again).

    Best Regards,

  • Blide12 Profile Picture
    30 on at

    Hi, after I reset my sandbox, the coding is working now, but there is some action that cant be changed, such as New Document, Request Approval, Customer, etc.

    Also how can I change the Customer Card Caption shown in the top left screen after the back button?

    4213.Untitled.png

    The code I tried to change Customer and Request Approval are:

    modify("Request Approval")
    {
    Caption = 'Modified requestApproval Action';
    }
    modify("&Customer")
    {
    Caption = 'Modified Customer Action';
    }

    How can I change the New Document as it now show up automatically in the visual code AL like Request Approval and Customer?

  • Blide12 Profile Picture
    30 on at

    Hi, after I reset my sandbox, the coding is working now, but there is some action that cant be changed, such as New Document, Request Approval, Customer, etc.

    Also how can I change the Customer Card Caption shown in the top left screen after the back button?

    70725.Untitled.png

    The code I tried to change Customer and Request Approval are:

    modify("Request Approval")
    {
    Caption = 'Modified requestApproval Action';
    }
    modify("&Customer")
    {
    Caption = 'Modified Customer Action';
    }

    How can I change the New Document as it now show up automatically in the visual code AL like Request Approval and Customer?

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans