Commandment 3: Reference the DataFormInstanceID within Tasks, Pages, and Form Fields

This commandment refers to Data Form Specs. Whenever you refer to a data form within a task, page or form field, refer to the feature by its DataFormInstanceID attribute and not its ID attribute.

Identify the Data Form

For example, Add Data Forms are created by an AddDataFormTemplateSpec, which includes a top-level AddDataFormTemplateSpec XML element or tag that is used primarily to uniquely identify and categorize the spec. The element contains three attributes related to identifying the spec to the Infinity platform:

  • Name

  • ID

  • DataFormInstanceID

In tasks, pages, and form fields that reference a data form, use the DataFormInstanceID to refer to the data form. For example, if you are opening an Add Data Form Spec from a Task Spec, then you should refer to the Add Data Form Spec by its DataFormInstanceID and NOT its ID.

Warning: An exception to this rule is the batch type spec. The batch type spec ties all of the other batch specs together. You now know that you typically refer to data forms from other spec's such as Page Specs or Task Specs by its DataFormInstanceID; however, when you refer to a Data Form Spec within the Batch Type Spec you should refer to the spec's ID attribute.

For all other types of non Data Form Specs, such as a Page Spec, always use the ID to defer to the non-Data Form Spec. For example, if you are opening a Revenuepage from an action on the Constituent page, refer to that Revenuepage by its ID attribute.