f365, JavaScript runtime API overview

The author-facing JavaScript surface every form exposes. Read field values, hook events, call SharePoint, show dialogs, all from the form's code drawer.

The f365 object is the author-facing JavaScript surface every SharePoint Forms365 form exposes. Authors write JavaScript in the designer's Code drawer or per-field event slots; that JS receives f365 as a parameter:

A minimal form-level handler

(f365) => {
  f365.events.onLoad(() => {
    f365.field('SubmittedOn').value = new Date().toISOString();
  });
};

The surface

PropertyDescription
f365.field(key)Property-style field access, value, visible, enabled, required, etc. See the field reference.
f365.control(id)Non-field components, buttons, linkedLists, headers. See the control reference.
f365.events.*Form-level event bus, onLoad, onChange, onBeforeSave, onSave, onValidate. See the events reference.
f365.data()Bulk read or write across all fields. See the data reference.
f365.user.*Current user, group membership, person lookup by id/email/login. See the user reference.
f365.format.*Locale-aware formatting, date, currency, number, bytes. See the format reference.
f365.ui.*showAlert, showConfirm, showToast, showDialog, showProgress. See the ui reference.
f365.nav.*goTo, goBack, refresh, redirectAfterSave, closeForm. See the nav reference.
f365.http.*Typed get/post/put/delete with JSON parsing. See the http reference.
f365.themeRead-only CSS-custom-property snapshot. See the theme reference.
f365.setTimeout / setIntervalTracked timers, auto-cleared on form unmount. See the timers reference.
f365.contextformId, listId, itemId, displayMode, currentUser, webUrl. See the context reference.
f365.spPre-bound PnPjs SPFI for arbitrary SharePoint calls. See the sp reference.
f365.versionRuntime version constant. See the version reference.

Type definitions

Ambient TypeScript definitions ship at docs/forms365-internal.d.ts in the SharePoint Forms365 source tree. Drop the file into your project's

typings/ folder for IntelliSense in VS Code while authoring form JavaScript externally.

Related articles