- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2017 04:45 AM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2017 03:33 AM
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:
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
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2017 03:33 AM
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:
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
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2017 04:56 AM
Got it now! Thanks a lot!