I would like to add a Main Menu option to create a new Insurance Claim Filing
, where:
- the user should be presented with a custom screen to input required fields
- upon saving a workflow should launch
- the workflow should create a spreadsheet including data entered by the user
- a task should be queued to have a manager review the spreadsheet
How do I accomplish this?
In this case, you want to put a cart before the horse. That is, you will render a child object (a
Task
) before it's parent object (Process
) is created. Leveraging QBO's related table data pattern and a tiny bit of javascript will bind theProcess
,Task
,Document
andWorkflow
together nicely.By leveraging a QBO's related table data feature,
Consider configuring the following:
Task Template
calledInsurance Claim Data Entry
Process_Process
: this will trigger the task to create anProcess
onchange
javascript handler to callensureProcess()
(see below)Process_ProcessTemplateID
: this will dictate theProcess Template
theProcess
is based on, and in turn, trigger the automatic creation of a workflowTask GUI Designer
:Workflow Template
calledInsurance Claim Filing
Task
namedInsurance Claim Data Entry
Document
namedInsurance Claim Analysis
Task
namedInsurance Claim Review
Process Template
calledInsurance Claim Filing
Insurance Claim Filing
workflow when it's createdTasks can be rendered before their parent exists by calling:
You can add to the Main Menu, replacing {a task template id} with the ID of your
Task Template
namedInsurance Claim Data Entry
.When a user clicks on the Main Menu link to call
ImportFormTemplate/RenderForm
, theTask
will be rendered. Key concepts to note:Process_Process
field is required, and a lynchpin to creating theTask
'sParent
object (in this case aProcess
).Process_ProcessTemplateID
ensures that the newly createdProcess
uses theProcess Template
you createdProcess Template
you configured will automatically launch a workflow whenever aProcess
based upon it is createdWorkflow
will automatically bind to the just-createdInsurance Claim Data Entry
task that kicked the whole thing off, because it's configured with aRepeatability
ofOne per parent