Share via


DictType.setStringLen Method

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

Syntax

public void setStringLen(int stringLen)

Run On

Called

Parameters

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

Remarks

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.

Examples

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); 
    } 
}

See Also

DictType Class

DictType.stringLen Method