valvore92
valvore92

Reputation: 317

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?

Upvotes: 2

Views: 1343

Answers (2)

Jonathan Bravetti
Jonathan Bravetti

Reputation: 2238

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

Example:

str fullName;    

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

Upvotes: 1

Matej
Matej

Reputation: 7627

Create display method like this:

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

See also edit method.

Upvotes: 3

Related Questions