Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

How can i change Label of existing form label for my menu item

(1) ShareShare
ReportReport
Posted on by 12
I created a custom module in which a menu item is there and i created a CustTable form extension for this menu item and when I click on New button to add a record a dialog box is opening and in that dialog box for 2 fields I want to change their label but when I go in visual studio in form design >action pane >dynamicHeader nothing is there and on the form it is saying that its under dynamicHeader_AccountNum how can I find it and change it label .
  • Deepak Agarwal Profile Picture
    8,575 on at
    How can i change Label of existing form label for my menu item
    I guess you are trying to change dialog fields label, which you can do it in your code on contact class, refer below code sample, 
     
     [DataMember,
        SysOperationLabel(literalStr("My Customers label")),
        SysOperationHelpText(literalStr("My Customer help text"))
        ]
        public CustAccount parmSynchCust(CustAccount _custAccount= custAccount)
        {
            custAccount= _custAccount;
            return custAccount;
        }
  • André Arnaud de Calavon Profile Picture
    294,217 Super User 2025 Season 1 on at
    How can i change Label of existing form label for my menu item
    When you mention that your code is not working, have you already used the debugger to find out if your coding is being executed at all and if it can find the control?
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,624 Moderator on at
    How can i change Label of existing form label for my menu item
    This form which you are talking about creates controls on run time. So you need to check at which place most probably init of form. If init is the right method, you can then get the control and change the label from x++. Also as this form is called from multiple places, make sure that you made a check checking the caller so that this doesnt affect other places.

    I'm editing my comment since you added when I might be typing. So as I said you need to identify at which point this control is getting created and there you can do a coc.
  • TD-03061201-0 Profile Picture
    12 on at
    How can i change Label of existing form label for my menu item
    [ExtensionOf(formStr(DirPartyQuickCreateForm))]
    final class DirPartyQuickCreateForm_TDHospitalityManagement1_Extension
    {
        public void init()
        {
            next init(); 
            MenuItemName callerForm = this.args().menuItemName();
            if (callerForm && strCmp(callerForm, menuItemDisplayStr(TD_AllCustomerMenuItem)) == 0)
            {
                //  DynamicHeader_AccountNum is the technical name of the control
                FormStringControl control = this. design().controlName("DynamicHeader_AccountNum") as FormStringControl;
                if (control)
                {
                    control.label("@TD_LableFile:TDHM0012");
                }
            }
        }
    }

    I used this code but it is not working can someone suggest something else

     
  • André Arnaud de Calavon Profile Picture
    294,217 Super User 2025 Season 1 on at
    How can i change Label of existing form label for my menu item
    Hi,
     
    You are using the standard creation form for adding customers. This form (DirPartyQuickCreate) is used for multiple entities, as an example also for prospects. 
    The form is built up dynamically when it opens. It will then set the table for a common data source and include several fields from a field group.
     
    I do assume you also have the standard customer form where you need to need the original labels. If you try to follow the logic on initialization of the form you can try to change the runtime label with X++ coding. 
     
     
  • TD-03061201-0 Profile Picture
    12 on at
    How can i change Label of existing form label for my menu item
    The issue is i can't find the control name anywhere it is not visible in action pane also it s not visible


  • Waed Ayyad Profile Picture
    8,287 Super User 2025 Season 1 on at
    How can i change Label of existing form label for my menu item
    Hi,
     
    Try to search for "dynamicHeader_AccountNum" on the form , then change its label but as you know if you want to change the label on the standard form so you need first to create extension of the form and on the extension change the label of the field.
     
     
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
  • Layan Jwei Profile Picture
    7,780 Super User 2025 Season 1 on at
    How can i change Label of existing form label for my menu item
    Hi,
     
    Can you please explain what do you mean by "create custable form extension for this menu item"?
     
    Do you mean you created an extension for custable and this menu item points to custtable?
     
    Also please share screenshots of your form in the UI and in VS
  • Martin Dráb Profile Picture
    232,978 Most Valuable Professional on at
    How can i change Label of existing form label for my menu item
    Are you saying you want to change the label of the standard field CustTable.AccountNum (and it doesn't have anything to do with your new fields)? Or am I missing something?
     
    Can you show us a screenshot of the dialog form, or share its name?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,217 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,978 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans