简体   繁体   English

如何在Dynamics AX中删除表单设计标题中的标题字段?

[英]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. 我用menuitembutton打开表单,标题中是来自数据源的可见标题字段。 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" 但是我在run()方法行Table_ds.create()插入并在menuitem属性EnumTypeParameter和EnumParameter中更改为值“ FormOpenMode”

Some additional methods. 一些其他方法。 You can change the caption a couple of ways. 您可以通过两种方式更改caption

Override the form's init method and this will work, but still leaves the (TitleField1, TitleField2) at the end of the caption. 覆盖表单的init方法,这将起作用,但仍将(TitleField1, TitleField2)在标题的末尾。

public void init()
{
    super();

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

Alternatively, override the form's run() method and do something like this: 或者,重写表单的run()方法并执行以下操作:

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. 通过清除表单设计节点的TitleDatasource属性,可以从表单标题栏中删除标题字段。

Note that when a new record is created, the title fields in the form title bar will be replaced with the text "New record". 请注意,创建新记录时,表单标题栏中的标题字段将替换为文本“ New record”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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