Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / How can i change Label...
Finance forum
Suggested answer

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

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
    Deepak Agarwal 132 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
    André Arnaud de Cal... 288,584 Super User 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
    Bharani Preetham Pe... 3,528 Super User 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
    TD-03061201-0 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
    André Arnaud de Cal... 288,584 Super User 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
    TD-03061201-0 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
    Waed Ayyad 3,904 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
    Layan Jwei 4,815 Super User 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
    Martin Dráb 225,864 Super User 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?

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,584 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,864 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans