TreeINFO-For-M365 documentation
    Preparing search index...
    interface IFormService {
        disableWaitDialog: boolean;
        field: Dictionary<IFieldService>;
        hideCommand: (commandId: string | string[]) => void;
        hideWaitDialog: () => void;
        isDisplayForm: boolean;
        isEditableForm: boolean;
        isEditForm: boolean;
        isNewForm: boolean;
        isTaskForm: boolean;
        readOnly: boolean;
        showCommand: (commandId: string | string[]) => void;
        showWaitDialog: (text?: string, options?: any) => IDialog;
    }

    Implemented by

    Index

    Properties

    disableWaitDialog: boolean

    Disables automatic display of the wait dialog for asynchronous operations

    field: Dictionary<IFieldService>

    Accesses the form field object

    const fValue = tisa.form.field.myField1.value;
    
    const { myField1 } tisa.form;
    myField1.readOnly = true;
    hideCommand: (commandId: string | string[]) => void

    Disables a command or commands on the form

    Type declaration

      • (commandId: string | string[]): void
      • Parameters

        • commandId: string | string[]

          identifier of the command or commands

        Returns void

    hideWaitDialog: () => void

    Closes the waiting dialog

    isDisplayForm: boolean

    True if the form does not allow editing of the item

    isEditableForm: boolean

    True if the form allows fields to be filled in. The "isEditableForm" property matches the condition ("isNewForm" or "isEditForm")

    const { form } tisa;
    const { myField1, myField2, myField3 } tisa.form;
    if (form.isEditableForm){
    myField1.readOnly = true;
    myField2.readOnly = false;
    myField2.required = true;
    myField3.value = "test";
    }
    isEditForm: boolean

    True if the form allows editing of the item

    isNewForm: boolean

    True if the item does not yet exist and the form allows filling in its metadata

    const { form } tisa;
    const { myField1, myField2 } tisa.form;
    if (form.isNewForm){
    // copies the value of field1 when changed to field2
    myField1.onChange((value)=>{
    myField2.value = value;
    });
    }
    isTaskForm: boolean

    True if the form displays a task to complete

    readOnly: boolean

    Gets or sets the editability of the form. Locks all editable fields.

    showCommand: (commandId: string | string[]) => void

    Enables a command or commands on the form

    Type declaration

      • (commandId: string | string[]): void
      • Parameters

        • commandId: string | string[]

          identifier of the command or commands

        Returns void

    showWaitDialog: (text?: string, options?: any) => IDialog

    Displays a waiting dialog

    Type declaration

      • (text?: string, options?: any): IDialog
      • Parameters

        • Optionaltext: string

          (optional) if not filled in, the standard text is displayed

        • Optionaloptions: any

          (optional) customize dialog options

        Returns IDialog