AX 2009: Multiple titlefields in form.

Hi All,

I’m asked to change the title of the CustOpenTrans form (Open Transaction Editing form) from

“Open transaction editing (caption) - Voucher (TitleField1 of TitleDataSource CustTrans), TransDate (TitleField2 of TitleDataSource CustTrans), Status, CustomerAccount

to

“Open transaction editing (caption) - Voucher (TitleField1 of TitleDataSource CustTrans), TransDate (TitleField2 of TitleDataSource CustTrans), Status, Search name (CustTable.NameAlias)”

Now, I’m having diffuculties finding out where this Status and CustomerAccount comes from and how I can change the latter into Search name.

Any ideas or suggestions would be much appreciated.

Thank you.

Hi Davy,

Hope this will help you, Do like this…

AOT → DataDictionary → Tables → CustTrans → Methods node. Right click on methods node override Caption method like this…


public str caption()

{

str ret;

Name searchName;

Voucher voucher;

TransDate transDate;

CustBillOfExchangeStatus status;

ret = super();

searchName = CustTable::find(this.AccountNum).nameAlias();

voucher = this.Voucher;

transDate = this.TransDate;

status = this.BillOfExchangeStatus;

ret = strFmt(‘Voucher: %1, %2, Status: %3, %4’, voucher, transDate, status, searchName);

return ret;

}


Then try to open ‘Open Customer Trasactions’ through Customers list page → Action pane button Transactions and then select Open button for “Open Transactions”…

Regards,

Ram

Hi Ram,

Thanks for your reply, however I do not get the desired result by overriding this method.

It results in: Voucher, transDate, Status, searchname, status, customerAccount.

The original 3rd and 4th titlefields are being kept or pushed from somewhere else, resulting in 6 titlefields now.

Regards,

Davy.

Hi Davy,

You can do one thing as try to remove ‘CustTrans’ and ‘CustTransOpen’ tables TitleField1 & TitleField2 properties., if not satisfied do some customization’s in Caption() methods of respective tables.

Regards,

Ram

Modifying the properties on table will have a considerable impact.

I think that the status and the customer account are the ranges applied(with values) on the title data source, so they are appearing after the title fields.

Try by removing the title data source in the design and updating the caption through code.

Hi Kranthi,

Thanks for you suggestion, but when I remove the Tittledatasource from the design, and I overwrite the caption() method, I somehow still get the incorrect information.

It showed as “Customer account: accountNum, NameAlias”, Voucher, TransDate and Status were gone however.

This (small) change is too time consuming to find an appropriate solution, so I’m going to leave it as it is in Standard AX.

This topic can be closed.