Autorun AI Docs

8. Toast

Toast notifications are non-blocking messages that appear briefly to report the outcome of an action.

context.toast.<type>(message)

The four typed methods:


context.toast.success("Record saved successfully.");
context.toast.error("Something went wrong. Please try again.");
context.toast.info("Sync is in progress.");
context.toast.warning("This action cannot be undone.");

Prop

Type

Use success after a write, error in catch, warning for a recoverable problem, info for progress that is not a result.

try {
  const result = await context.sdk.entities.update({
    params: { entitySlug: "invoices", recordId: context.router.id },
    json: { Status: 3 }
  });
  if (!result.success) throw new Error(result.message);
  context.toast.success("Invoice status updated.");
} catch (error) {
  context.toast.error(error.message);
}

On this page