简体   繁体   中英

How to remove title fields in form design caption in Dynamics AX?

I open form with menuitembutton and in caption are visible title fields from datasource. Can I remove it? This form should be for creating new records and this title fields can be confusing.

In my case title bar is not replaced with text "New record". But I insert in run() method line Table_ds.create() and change in menuitem properties EnumTypeParameter, EnumParameter to value "FormOpenMode"

Some additional methods. You can change the caption a couple of ways.

Override the form's init method and this will work, but still leaves the (TitleField1, TitleField2) at the end of the caption.

public void init()
{
    super();

    element.design().caption("New Caption");
}

Alternatively, override the form's run() method and do something like this:

public void run()
{
    super();

    WinAPI::setWindowText(this.hWnd(), "New Caption without other stuff");
}

The title fields can be removed from the form title bar by clearing the TitleDatasource property of the form's design node.

Note that when a new record is created, the title fields in the form title bar will be replaced with the text "New record".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM