What you will build
An Update template for a Contract class with a required name, customer reference, review notes, and one explicit save button. Start with the form; add related objects, searches, and scripts after this version saves correctly.Prepare the class and access
You needcaseflow-configuration.manage to author templates. Prepare a class with these attributes and an existing test object:
Use the exact attribute names from your class. Template labels can be friendly text, but
attributeName must resolve to the configured attribute. The test account also needs permission to open and update the object.
Open the editor
Under Settings → Admin → Caseflow → Templates, select the application and class, then create an Update template. Name itContract review.
The editor combines template settings, source, component help, validation problems, and a preview. A starter or Scaffold from class gives you a starting point. Loading a starter changes the draft; it does not save it. Review its placeholder names against your class.
Add the form
Use this complete starting template:required rule improves the editing experience. It does not replace API validation or an access rule for other callers.
Preview and resolve problems
Use the preview to inspect spacing, labels, and the selected template type. Use the Problems panel to locate unknown attributes, misspelled component names, and invalid properties. Component help supplies the supported properties; do not assume an arbitrary HTML attribute is a component option. The preview offers Sample data and Real object. Saving, scripts, and other side effects are blocked in preview mode, even if a control is displayed. A preview is useful for layout and bindings. Verify saving on an actual test object as well: a good-looking form is not evidence that its user can update the class.The complete example beside its generated sample-data preview. Save review is blocked in preview.
Save and verify selection
Save the template, then open the test object through the normal Caseflow surface. Check:- The intended Update template is selected for the account.
- Existing values appear in all three fields.
- Clearing Name prevents the form’s required-field validation from passing.
- Saving an edited review note persists it; reopening the object shows the new value.
- An account without update rights cannot gain write access through the template.
Compare and restore a saved version
Open History while editing an existing template. Select a saved version to compare it with the current draft.- Load into editor changes the draft only. Review the preview and save when ready.
- Restore is a server-side change: it overwrites the saved template with the selected version and creates a new history entry. Current group assignments remain unchanged. Read the confirmation before proceeding.
Use AI assistance for a bounded change
When AI template assistance is available to your group, open its panel and describe the business form and the change you want. You still need permission to manage Caseflow templates. A useful request is: “Keep the current Contract form. Put the customer reference beside the contract name and move Review notes below them. Keep the existing attribute bindings and Save review action.” The proposal appears as a diff against your draft. Accept brings it into the editor; Discard leaves the draft unchanged. Acceptance does not save the template. Inspect the Problems panel and preview, then verify saving with a real test object. If the draft changed during generation, compare against the current text before accepting. Generated code can need further correction even after syntax checks pass. Begin with a starter or Scaffold from class when a standard layout is sufficient.Extend one behavior at a time
- Add a RelationPicker when the customer is a related object rather than text.
- Add an ObjectSearch for child records, with an explicit filter linking them to the current object.
- Add a script-backed autofill to normalize the reference, then verify the script’s target attributes and published version.
- Add an
onBeforeSavehook for a form business rule, and test both the successful and rejected paths.
Where to read next
Templates and syntax
Learn how Caseflow templates work — types, selection, syntax for variables, conditionals, loops, and the scope model.
