简体   繁体   中英

Two fields in one - tables in dynamics AX

I have to create method for table in Dynamics AX which concatenate two fields from one table in one field. For example Name+Surname displays in one field. How can I do it?

Create display method like this:

public display PersonName fullName()
{
    return this.FirstName + ' ' + this.LastName;
}

See also edit method .

To concatenate two fields (or more) you can use StrFmt() method.

Example:

str fullName;    

fullName = strFmt("%1 %2", this.Name, this.Surname);

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