Interface ControlPageFieldApi

API methods related to object fields associated with a page.

interface ControlPageFieldApi {
    getClientFieldProperties<Type>(field: string): undefined | FieldTypeToClientFieldProperties<Type>;
    getFieldRestrictions<Type>(field: string): FieldTypeToRestrictions<Type>;
    getFieldValue<Type>(field: string): FieldTypeToValue<Type>;
    getFormattedDisplayValue(field: string): Promise<undefined | string>;
    setFieldValue<Type>(value: FieldTypeToValue<Type>, field: string): void;
}

Methods

  • Returns the value of the supplied field. This works only with fields for the current object with which the control is associated. For example, if the control is on a parent object, you cannot get a child's field.

    Type Parameters

    Parameters

    • field: string

      {string} Field name.

    Returns FieldTypeToValue<Type>

  • Returns the formatted value of the supplied field. This works only with fields for the current object with which the control is associated.

    Parameters

    • field: string

      {string} Field name.

    Returns Promise<undefined | string>

    A promise that resolves to the formatted field value, or undefined if the field is not found.

  • Sets the value of the supplied field. This works only with fields for the current object with which the control is associated. For example, if the control is on a parent object, you cannot set a child's field.

    Type Parameters

    Parameters

    Returns void