Skip to main content

IModel.SetInitField method

Namespace: NextDesign.Core

Description

Sets the initial value of the field defined in the metamodel to the specified field of this instance.
Sets the default value for the field type if the metamodel does not specify an initial value for the field.

If this method is called on an owned field of a class type, the IModel set as the field value will be removed.
Also, if this method is called for a reference field of class type, the association with the IModel set as the field value is deleted (the IModel of the field value is maintained, not deleted).

argument

NameTypeDescription
fieldNamestringField name
You cannot specify null or an empty string.

Return value

  • void

Exceptions

NameException ClassDescription
Invalid argumentExtensionArgumentExceptionIf null or an empty string is specified for fieldName
Field not foundExtensionFieldNotFoundExceptionIf the specified field is not found in this instance's metaclass
Illegal operationExtensionInvalidOperationExceptionIf the model itself is a deleted model or a temporary proxy
If an inoperable field is specified in the field name
- Product line feature assignment field
- System. Fields tagged with Core