Project resource scheduling data model
This topic provides information about the Project resource scheduling data model.
Physical data model for Project resource scheduling
The following table provides a list of additional tables that support the Resource management data model.
|ResResourceIdentifier||Stores all resources and a subset of records from the WrkCtrTable table that are identified as resources. When a resource is added, a record will be added to the WrkCtrTable **table. A record will also be added to this table with a Foreign Key reference to the new record in the **WrkCtrTable table.|
|ResourceSetup||Specifies a resource’s property. This table replaced the ProjWorkerSetup table in Dynamics AX 2012.|
|ResBooking||Stores all resource booking type reservations. This table replaced some of the information stored in the PSASchedEmplReservation table in Dynamics AX 2012.|
|ResAssignment||Stores all resource assignment type reservations. This table replaced some of the information stored in the PSASchedEmplReservation table in Dynamics AX 2012.|
|ResourceResourceCategorySetup||Stores the resource default project role association that is validated by a time range. This is a time effective table which has a Foreign Key to ResResourceIdentifier.RecId and a Foreign Key to PSASchedRole.RecId with ValidFrom and ValidTo fields. The PSASchedRole table is used to store the project role.|
|ResCalendarCapacity||This is a data denormalized table based on WorkCalendarTable, WorkCalendarDate, and WorkCalendarDateLine to calculate resource capacity. The calculation is based on the resource associated calendar date line definition, which is specified in the WorkCalendarDataLine table. The data in this table can be generated by running the Synchronize resource capacity roll-ups batch job.|
|ResRollUpCalendar||This is a data denormalized table based on ResCalendarCapacity. The data in this table is used by the ResRollUpWriter class to speed up the process of adding resource records to the ResRollup table. The data in this table can be generated by running the Synchronize resource capacity roll-ups batch job.|
|ResRollUp||This is a data denormalized table based on ResBooking, ResAssignment, and ResRollUpCalendar for performance improvement. This table contains all of the capacity and reservation data for time scales, including Day, Week, Month, Quarter, and Half year, for all resources. This data is accessed by the AvailabilityView control, which is included with any resource scheduling X++ form that includes this control, like the Resource availability form. The data in this table can be generated by running the Synchronize resource capacity roll-ups batch job. Data is updated for every resource reservation action such as adding a new resource, booking, assignment, and reservation cancellation.|
The following table provides a list of the most informative views that you can use to access the Resource management data model.
|ResResourceWorkCenterView||This view is based on ResResourceIdentifier joining to WrkCtrTable, which captures only the fields that are required for resource management.|
|ResourceView||This view is based on ResResourceIdentifier, which is only based on ResResourceWorkCenterView. In a future release it can be extended to more than ResResourceWorkCenterView if a resource record will be saved on more than just ResResourceWorkCenterView.|
|ResourceWorkerView||This view replaces the HcmWorker table, which is based on ResResourceIdentifier. WrkCtrTable has a worker field which is a Foreign Key to HcmWorkerTable. This view includes all WrkCtrTable resource which worker field is not 0.|
|ResourceLegalEntityView||This view replaces the HcmEmployment table. This is the resource legal entity (LE) view, which is a union of ResourceWorkerLegalEntityView and ResourceOtherLegalEntityView. The purpose of this view is to look up the resource legal entity as well as the associated valid from and valid to date. For example, an HcmWorker resource can be hired by multiple LEs with different ValidFrom and ValidTo dates. If the worker is hired by multiple LEs, then this worker resource will have multiple records in this view. If the resource is not a HcmWorker, then this resource will have only one record and validFrom = minDate and ValidTo = maxDate.|
|ResourceCalendarView||This view replaces WorkCalendarTable. This view contains the calendar RecId of the resource. This is a union view of ResourceWorkerCalendarView, ResourceOtherCalendarView, and ResourceGroupResourceCalendarView. To look up the resource calendar, users should first look up the ResourceLegalEntityview. This is because a resource should have a different calendar depending on the resource’s legal entity. First, locate the record from ResourceLegalEntityView and get the RefRecId and RefTableId fields. Then, look up ResourceCalendarView by setting ResourceLegalEntityRefRecId = ResourceLegalView.RefRecId and ResourceLegalEntityRefTableId = ResourceLegalView.RefTableId.|
|ResourceCategoryView||This view shows the resource category (the resource role for a worker resource), which is based on the PSASchedRole table.|
|ResSkillHcmView||This view is based on HcmSkill to capture all the skills that are defined in the HcmSkills table.|
|ResCertificateHcmView||This view is based on HcmCertificateType to capture all the certificates that are defined on the HcmCertificateType table.|
|ResEducationHcmView||This view is based on HcmEducationDiscipline to capture all the education disciplines that are defined in the HcmEducationDiscipline table.|
|ResProjectHcmView||This view is based on ProjTable to capture all projects that exist in the ProjTable.|
|ResRoleView||This view is based on ResourceCategoryView to capture all resource categories.|
|ResCharacteristicView||This view is the union view of ResSkillHcmView, ResCertificateHcmView, ResEducationHcmView, ResProjectHcmView, and ResRoleView. This view is used to gather all the characteristics that are defined as selectable criteria for the resource search feature.|
|ResResourceCharacteristicView||This view is the union view of ResResourceCharacteristicHcmView, ResResourceResourceCategoryView, ResResourceNameView, and ResResourceRoleCharacteristicView. This view is used to identify the characteristics that are associated with a resource for the resource search feature.|
|ResCalendarCapacityView||This view is based on ResCalendarCapacity, which contains calendars that are specified in WorkCalendarTable with capacity details.|
|ResCapacityView||This view shows the resource’s capacity per hour.|
|ResResourceCapacityWorkDaysView||This view is based on ResCapacityView, which shows the resource capacity per day.|
|ResAssignmentView||This view is based on the table ResAssignment, which stores the activity resource assignments to either project or quotation work breakdown structure (WBS) task.|
|ResBookingView||This view is based on the table ResBooking, which stores the activity resource bookings to a project or quotation.|
Changes that will affect tables and fields
These sections contain information regarding code changes to tables and fields that are part of the feature implementation related to Project resource scheduling.
The table PSASchedEmplReservation is no longer used to store a resource’s reservations. Instead, reservations are stored in the ResAssignment and ResBooking **tables. Both tables use the **Activity resource field Foreign Key for PSAProjSchedRole.RecId to store a resource’s reservation. The PSAProjSchedRole table is the project team table that has the Resource field Foreign Key to ResourceView.RecId and the ResourceLegalEntity field Foreign Key to CompanyInfo.RecId to identify which resources are the project’s or quotation’s team members. If the PSAProjSchedRole.Resource field = 0, then this activity resource is a planned resource. A planned resource is a shadow resource that is not backed by an actual resource. PSAProjSchedRole.ResourceCategory is a Foreign Key to PSASchedRole that stores the role of this team member. The ResourceResourceCategorySetup table stores the default time effective resource/role association. However, the resource can be reserved to any role defined by PSAProjSchedRole.ResourceCategory, ignoring the default role definition on the ResourceResourceCategorySetup table. Regarding WBS versioning, the tables ProjPlanVersions and ProjPlanVersionDetails store the WBS tasks versions. Initially, all WBS task data will be stored on these tables while the user is editing the WBS tasks content. After the user clicks the Publish button, the task data will be pushed to the original hierarchy tables (smmActivities and PSAActivitySetup). The resource management feature requires data in the original hierarchy tables and requires a published WBS.
Price by resource and resource category
The pricing tables, ProjCostPriceExpense, ProjCostSalesPrice, and ProjRevenueSalesPrice have a Foreign Key from ResourceView.RecId. The tables ProjHourCostPrice, ProjHourSalesPrice, and ProjTransferPrice have a Foreign Key from ResourceView.RecId. The field ResourceCategory is part of the Foreign Key for ResourceCategoryView.RecId. This is done so that pricing is based on a resource instead of a worker and enables pricing setup by resource category.
Common methods to get resource field and lookup resources
There are several resource methods in the ResourceFacade class. The following table includes some of the most common methods.
|ResourceFacade.findByWorker()||Look up the resource record ID by HcmWorker record ID.|
|ResourceFacade.findOrCreateByWorker()||Look up the resource record ID by HcmWorker record ID. If the resource record ID is not found, then a resource record ID will be added to the ResResourceIdentifier table and the resource record ID will be returned.|
|ResourceFacade.findByResourceID()||Look up the resource record ID by resource ID.|
|ResourceFacade.get…||There are many get methods supported for the resource in the ResourceFacade class. Resource related values like Resource ID, Resource calendar, Resource legal entity, and Resource period can be queried from the ResourceView, ResourceLegalEntityView, ResourceCalendarView, and ResourceSetup tables.|
The following table lists the facade classes that you can use as a starting point to interact with the Resource management data model.
|ActivityFacade||Contains the methods to retrieve an activity’s properties, including ID, Quotation ID, Project ID, Booked/assigned capacity, Remaining capacity, Calendar, Activity number, and Root project activity.|
|ActivityResourceFacade||Contains the methods to retrieve an activity's resource properties including Calendar, Name, Resource category, Resource legal entity, Is generic resource, and Is team member.|
|PeriodFacade||Contains the methods to retrieve period properties including Start and End date, Period ID, and Period name.|
|ResourceCalendarFacade||Contains the methods to retrieve the resource's calendar properties including Calendar data area ID, Calendar ID, Calendar RecID, Capacity, and Dates.|
|ResourceCategoryFacade||Contains the methods to retrieve the resource's default resource Category, ID, Name, and Type.|
|ResourcePeriodFacade||Contains the methods to retrieve the resource's period date range and update the period method.|
|ResourceWorkerFacade||Contains the methods to retrieve the Employment type.|