DictType.setStringLen Method [AX 2012]

Sets the string length for an extended data type that is based on the string data type.

public void setStringLen(int stringLen)

Run On

Called

Parameters

stringLen
Type: int
An integer that indicates the string length.

This method lets you create, read, update, and delete X++ code and metadata. Make sure that the user has access to the development security key (SysDevelopment) before this API is called.

The string length corresponds to the StringSize property for the extended data type in the AOT.

The following example sets the StringSize property to 10 for the AccountName extended data type.

server static public void Main(Args _args) 
{ 
    DictType  dt; 
 
    dt = new DictType(ExtendedTypeNum(AccountName)); 
    if (dt) 
    { 
        dt.setStringLen(10); 
    } 
}

Community Additions

ADD
Show: