Which business rule/script include triggers the creation of Resource Allocations for a Resource Plan?

vangmayeec
Kilo Contributor

When we click the 'Confirm' or 'Confirm and Allocate' button on 'Resource Plan' form, 'Resource Allocations' are automatically created in the 'resource_allocation' table. I would like to know which business rule/script include or any other action that is responsible for this functionality.

1 ACCEPTED SOLUTION

Hi,



Records for Resource Allocations are getting inserted using the UI Action code only where initially it's querying the "Resource Plan" table and checking for the state field on the Resource Plan using the Script Include "ResourcePlanState" which is calling again a script Include "ResourcePlanStateChangeHandler" . If the State of the Resource Plan is changed to "Allocated" and if a match is not found for the same record in the Table, using the below line it's inserting the Record into the Allocated Module:



updatedRecord.update();



The same Operation works for other Table also say for Example I have created a UI Action named "Create task" on the Incident Table with the same code as that present in "Confirm and Allocate" UI Action to create Incident Task if it is not present. Refer the screen shot below:



find_real_file.png


So once I click on this button, it checks if a Record is there on the Incident Task Table or not, if it is not there it creates a new Record.



Hope this helps.Mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

6 REPLIES 6

Hi,



Records for Resource Allocations are getting inserted using the UI Action code only where initially it's querying the "Resource Plan" table and checking for the state field on the Resource Plan using the Script Include "ResourcePlanState" which is calling again a script Include "ResourcePlanStateChangeHandler" . If the State of the Resource Plan is changed to "Allocated" and if a match is not found for the same record in the Table, using the below line it's inserting the Record into the Allocated Module:



updatedRecord.update();



The same Operation works for other Table also say for Example I have created a UI Action named "Create task" on the Incident Table with the same code as that present in "Confirm and Allocate" UI Action to create Incident Task if it is not present. Refer the screen shot below:



find_real_file.png


So once I click on this button, it checks if a Record is there on the Incident Task Table or not, if it is not there it creates a new Record.



Hope this helps.Mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Got it now! Thanks a lot!