xRecord.setFieldValue Method [AX 2012]

Sets the field value in the record buffer.

public void setFieldValue(
    str fieldName, 
    anytype value, 
   [int arrayIndex])

Run On

Called

Parameters

fieldName
Type: str
The field name.
value
Type: anytype
The value to assign to the field.
arrayIndex
Type: int
The array index of the field; optional.

The arrayIndex parameter applies only to array fields. Either omit this parameter or specify0 (zero) for fields that are not arrays.This method throws an ArgumentOutOfRange exception if the specified field is unknown or a TypeMismatch exception if the value parameter is incompatible with the specified field..

Community Additions

ADD
Show: