Hi everyone,
I've done some reading around and whilst the problems seems to be solvable I'm going around in circles
Scenario
Once new inventory component is created, we need to pre-populate a list of tasks for (percentage) allocation. (via Custom Function)
Problem
I can't seem to be able to loop through the tasks and incrementally add them into the sub-form. I have tried
Directly adding (via insert record) to Sub-Form. However, I get the error "
Form 'Task_Distribution' does not exist in the application"
- void Estimator.CreateInventoryTaskTemplate (int factorID)
- {
- // TEST RECORD
- // 3724905000000045031
-
- // Retrieve the current tasks associated to TEST
- tasks = Task [ Work_Stream.Name="TEST" && State = "Active"];
-
- // Retrieve the current factor
- for each factor in Factor [ ID = factorID ]
- {
- // Populate the initial tasks available to applications
- for each task in tasks
- {
- // THIS IS WHERE WE NEED TO POPULATE THE ALLOCATED TASKS
- // INFORMATION THAT NEEDS TO BE POPULATED
- // factor.Task_Distribution (sub-Form)
- // factor.Task_Distribution.Factor (Parent Record)
- // factor.Task_Distribution.Task (LookUp)
- // factor.Task_Distribution. Allocation (Percentage %)
- }
- }
-
- }