Table of Contents

SenseiDataIngestionPlugin

Class Sensei_AdjustCapacityForCalendarChange

Summary

This Plugin handles the situation where an Enterprise Calendar record is modified (E.g. work days or number of work hours are changed). In this scenario, an update to each associated Bookable Resource will be triggered so that that Resource's capacity is recalculated.

Purpose

Ensures synchronization between Calendar records and Resources, responding to changes in workdays or hours.

Features

  • Dynamic Capacity Updates

Activation

  • Capacity Calculations switch must be on.
  • Modify Calendar records (workdays or hours).

Class Sensei_AdjustCapacityForCalendarException

Summary

This Plugin handles scenarios where a Calendar Exception record is created or updated. Capacity calculations need to be re-performed for the period in question.

Purpose

Ensures that capacity calculations are re-performed when a Calendar Exception record is created or updated.

Features

  • Dynamic Capacity Recalculation: Automatically recalculates capacity for the specified period when a Calendar Exception is created or updated.

Activation

  • Creation or update of Calendar Exception records.

Class Sensei_AlignExternalProject

Summary

This Plugin handles Create and Update calls to External Project. Whenever an External Project is made Primary, a sync from the external project data should occur, and the sensei_fieldlock field is set. If an External Project is 'removed' from being Primary, then the sensei_fieldlock field should be blanked out.

Purpose

Ensures synchronization and field locking operations when External Project records are created or updated.

Features

  • Dynamic Field Locking: Sets the sensei_fieldlock field based on the Primary status of the External Project.
  • External Project Data Sync: Initiates a sync from external project data when an External Project becomes Primary.

Activation

  • Creation or update of External Project records.

Class Sensei_AlignExternalTask

Summary

Handles the Aligning of an External Task entity, including synchronization with the corresponding Sensei Task.

Purpose

Performs necessary operations to sync External Task data with Sensei Task records and handles any related assignments.

Features

  • External Task Data Sync: Initiates a synchronization process between raw external task data and Sensei Task records.
  • Dynamic Sensei Task Update: Updates or creates Sensei Task records based on changes in External Task data.
  • Assignment Sync: Ensures synchronization of assignments related to the External Task.

Activation

Triggered on the creation or update of External Task records.

Class Sensei_API_BulkCreateFiscalPeriods

Summary

Generates fiscal periods in bulk based on specified parameters.

Purpose

Facilitates the creation of fiscal periods in bulk, ensuring efficient handling of the process.

Features

  • Dynamic Input: Accepts various parameters to customize the generation of fiscal periods.
  • Output Status: Returns a result indicating success (OK), error, or an unknown status.
  • Informative Message: Provides a detailed message to aid in understanding the result.

Activation

Triggered through a custom API function call.

Class Sensei_API_BulkCreateTimesheetPeriods

Summary

Generates timesheet periods in bulk based on specified parameters.

Purpose

Facilitates the creation of timesheet periods in bulk, ensuring efficient handling of the process.

Features

  • Dynamic Input: Accepts various parameters to customize the generation of timesheet periods.
  • Output Status: Returns a result indicating success (OK), error, or an unknown status.
  • Informative Message: Provides a detailed message to aid in understanding the result.

Activation

Triggered through a custom API function call.

Class Sensei_API_DeleteExternalTasks

Summary

This function will attempt to delete a number of external tasks from the system.

Purpose

Facilitates the deletion of external tasks in bulk, ensuring efficient handling of the process.

Features

  • Dynamic Input: Accepts external project GUID and a limit of how many to delete, if zero it will delete all.
  • Output Status: Returns a result indicating success (OK) or a error status.
  • Informative Message: Provides a detailed message to aid in understanding the result.

Activation

Triggered through a custom API function call.

Class Sensei_API_DeleteTasks

Summary

This function will attempt to delete a number of tasks from the system.

Purpose

Facilitates the deletion of tasks in bulk, ensuring efficient handling of the process.

Features

  • Dynamic Input: Accepts external project GUID and a limit of how many to delete, if zero it will delete all.
  • Output Status: Returns a result indicating success (OK) or a error status.
  • Informative Message: Provides a detailed message to aid in understanding the result.

Activation

Triggered through a custom API function call.

Class Sensei_API_RateByDay

Summary

This function returns a collection of dates and corresponding rates for the selected Resource (and optionally Project/Proposal).

Purpose

The purpose of this function is to provide a flexible and comprehensive way to retrieve rate data for a specified Resource, allowing users to obtain both default rates and project-specific overrides when necessary.

Features

  • Retrieves date and rate information for a selected Resource.
  • Optionally includes project and proposal data.
  • Supports the inclusion of project overrides, with details such as project ID and additional rate information.

Activation

Triggered through a custom API function call.

Class Sensei_API_ResourceToFinanceSync

Summary

This function will synchronise financial data from the Resource Plan to the Finance Grid.

Purpose

The purpose of this function is to ensure that financial data is consistently and accurately updated in the Finance Grid based on the corresponding data in the Resource Plan.

Features

  • Aggregation of financial data based on the specified zoom level (FiscalPeriod or Month).

Activation

Triggered through a custom API function call.

Class Sensei_API_ResReqRateCalcByDay

Summary

This function will return a collection of calculated totals of rate x hours for the selected Bookable Resource across the date period. Optionally refined to Project or Proposal.

Purpose

The purpose of this function is to provide users with the calculated totals of rate multiplied by hours for a specified Bookable Resource over a given date period. This information can be optionally refined based on the selection of a specific Project or Proposal.

Features

  • Calculation of totals based on the rate and hours for the selected Bookable Resource.
  • Optional refinement of the calculation to a specific Project or Proposal.

Activation

Triggered through a custom API function call.

Class Sensei_API_TimesheetToTaskSync

Summary

This function will assist in synchronising task actuals data from Approved Timesheets.

Purpose

The purpose of this function is to facilitate the synchronization of task actuals data from Approved Timesheets. By executing this function, users can ensure that actuals data associated with tasks is accurately and timely updated based on the information from approved timesheets.

Activation

Triggered through a custom API function call.

Class Sensei_AttributeTimesheetOwnership

Summary

This plugin is designed to be executed whenever a Timesheet is updated. It ensures owner consistency of Timesheets.

Purpose

The purpose of this plugin is to perform ownership checks on the Timesheet record and ensure consistency of ownership between Timesheet Rows and Timesheet Data records with the parent Timesheet.

Features

  • Ownership check of the Timesheet record.
  • Ensures that Timesheet Rows and Timesheet Data records have the same owner as the parent Timesheet.

Activation

This plugin is activated whenever a Timesheet is updated.

Class Sensei_CascadeDeleteExecution

Summary

This function is designed to run as a Synchronous Post event on deletion of certain entity records.

Purpose

The purpose of this function is to handle the deletion of specific entity records in a synchronous manner. It is particularly triggered as a Post event following the deletion of certain records. Refer to Sensei_CascadeDeletePreparation for details on the preparation task.

Features

  • Utilizes SharedVariable written to by the Sensei_CascadeDeletePreparation function.
  • Deletes items that are now orphaned based on the information from the preparation task.
  • Specific actions for deletion related to different entities:
  • For Project:
  • Delete related Resource Cost Rate(s).
  • Delete related Resource Sell Rate(s).
  • For Proposal:
  • Delete related Resource Cost Rate(s).
  • Delete related Resource Sell Rate(s).
  • Delete related Resource Request(s).
  • For Bookable Resource:
  • Delete related Calendar Exception(s).

Activation

This function is activated as a Synchronous Post event on the deletion of specific entity records.

Class Sensei_CascadeDeletePreparation

Summary

This runs as a PreValidation Synchronous plugin step, looking for related items scheduled for cascade delete outputing to a SharedVariable so they can be deleted Asynchronously by the Sensei_CascadeDeleteExecution plugin code

Purpose

The purpose of this plugin is to optimize the deletion process in Microsoft Dynamics 365 by managing the deletion of specific related records before their parent records are deleted. This approach improves the overall efficiency of the cascade deletion operation.

Features

  • Operates as a PreValidation Synchronous plugin step.
  • Identifies related items scheduled for cascade deletion in scenarios involving Projects, Proposals, and Bookable Resources.
  • Deletes related Resource Cost Rate(s), Resource Sell Rate(s), and other associated records based on the specified scenarios.
  • Outputs identified items to a SharedVariable for asynchronous deletion by the Sensei_CascadeDeleteExecution plugin.

Activation

This plugin is configured to run as a PreValidation Synchronous step in the Microsoft Dynamics 365 execution pipeline. It efficiently identifies and processes related items for cascade deletion, enhancing the overall deletion performance.

Class Sensei_DeleteExternalProject

Summary

This Plugin code handles the deletion of ExternalProject records and ensures the proper reset of associated SenseiProject's FieldLock information.

Purpose

The purpose of this code is to maintain data integrity by resetting FieldLock information in SenseiProject when an ExternalProject record, marked as Primary, is deleted.

Features

  • Reacts to the deletion of ExternalProject records.
  • Resets SenseiProject's FieldLock information if the deleted ExternalProject was marked as Primary.

Activation

This code is activated whenever an ExternalProject record is deleted.

Class Sensei_DeleteExternalTask

Summary

This Plugin code is designed to run whenever an ExternalTask record is deleted, ensuring the deletion of associated sensei_tasks.

Purpose

The purpose of this code is to handle the cleanup process when an ExternalTask is removed, specifically deleting related sensei_tasks.

Features

  • Automatic execution upon ExternalTask deletion.
  • Ensures the removal of associated sensei_tasks.

Activation

This code is activated upon the deletion of an ExternalTask record.

Class Sensei_DeleteFiscalPeriod

Summary

This Plugin code functions as a Pre-Validation step executed when a Fiscal Period record is deleted.

Purpose

The purpose of this code is to prevent the creation of gaps between existing Fiscal Periods caused by the deletion of a Fiscal Period record.

Features

  • Pre-Validation execution to intercept Fiscal Period deletion.
  • Gap prevention mechanism to maintain continuity in Fiscal Periods.

Activation

This code is triggered as a Pre-Validation step when attempting to delete a Fiscal Period record.

Class Sensei_DeleteRelatedComments

Summary

This Plugin code is designed to run upon the deletion of a Resource Request record, with a focus on managing associated sensei_comments.

Purpose

The purpose of this code is to handle the cleanup process when a Resource Request record is deleted, specifically dealing with the removal of related sensei_comments.

Features

  • Automatic execution triggered by the deletion of a Resource Request record.
  • Ensures the deletion of associated sensei_comments.

Activation

This code is activated whenever a Resource Request record is deleted.

Class Sensei_DeleteRelatedTimesheetRows

Summary

This function operates as a PreOperation executed during the deletion of a sensei_task, aiming to manage associated sensei_timesheetrow records.

Purpose

The purpose of this function is to identify sensei_timesheetrow records referencing the task slated for deletion and remove them if lacking associated hours.

Features

  • PreOperation execution during sensei_task deletion.
  • Removal of sensei_timesheetrow records linked to the deleted task with no associated hours.

Activation

This function is activated as a PreOperation during the deletion of a sensei_task.

Note

8/3/23 - does not seem to be triggering via cascade delete of sensei_task via delete of a sensei_project.

Class Sensei_DeleteTimesheetPeriod

Summary

This code serves as a Pre-Validation step executed when deleting a Timesheet Period record. It prevents the creation of gaps between existing Timesheet Periods.

Purpose

The purpose of this plugin is to maintain the continuity of Timesheet Periods, avoiding disruptions caused by deletions.

Features

  • Runs as a Pre-Validation step during the deletion of a Timesheet Period record.
  • Ensures the integrity of Timesheet Periods by preventing gaps between them.

Activation

This plugin is activated automatically whenever a Timesheet Period record is deleted.

Class Sensei_EnforceFieldLock

Summary

This plugin code is designed to run whenever a sensei_project or sensei_task record is updated. It performs field validation during the PreValidation stage to ensure that the update does not include fields specifically locked for the project. It allows updates to locked fields only if called from an authorized Sync function (e.g., where sensei_originofchange = 'SenseiSync'). Additionally, the function removes the sensei_originofchange parameter if passed in to prevent it from being saved against the item.

Purpose

The purpose of this code is to enforce validation rules during record updates for sensei_project and sensei_task, specifically focusing on preventing updates to locked fields unless authorized by a Sync function.

Features

  • Validation of field updates during the PreValidation stage.
  • Restriction on updating fields locked for the project, unless authorized by a Sync function.
  • Removal of the sensei_originofchange parameter to prevent it from being saved against the item.

Activation

This code is triggered whenever a sensei_project or sensei_task record is updated.

Class Sensei_EnsureResourceTimesheetOwnership

Summary

It aims to perform specific actions, primarily related to ensuring that Timesheets associated with the Bookable Resource have the correct System User as the owner.

Purpose

The purpose of this plugin is to execute whenever a Bookable Resource is updated. It aims to perform specific actions, primarily related to ensuring that Timesheets associated with the Bookable Resource have the correct System User as the owner.

Features

  • Verification of the presence of an associated System User for the Bookable Resource.
  • Assignment of the relevant System User as the owner for associated Timesheet records.
  • Silent failure handling if the associated System User lacks permission to own Timesheet records.

Activation

This code is triggered whenever a Bookable Resource is updated.

Class Sensei_HandleNewProjectPayload

Summary

This Plugin is designed to look for a new project payload stored in the OriginOfChange field on create and creates the external project link if present.

Purpose

The purpose of this Plugin is to automate the creation of an external project link based on information stored in the OriginOfChange field during the creation of a new project.

Features

  • Monitors the OriginOfChange field for new project payloads.
  • Creates an external project link when a valid payload is found.

Activation

Class Sensei_InheritOwnershipFromTimesheet

Summary

This plugin ensures data integrity by checking ownership consistency between Timesheet Rows or Timesheet Data records and their parent Timesheet.

Purpose

The purpose of this plugin is to be executed upon the creation of a new Timesheet Row or Timesheet Data record, verifying the ownership relationship to maintain data consistency.

Features

  • Ownership check of the related Timesheet for the created record.
  • Verification to ensure the owner of the entity record matches the owner of the parent Timesheet.

Activation

This plugin is triggered whenever a new Timesheet Row or Timesheet Data record is created.

Class Sensei_Notification_Resourcerequest

Summary

This component is responsible for creating Resource Request Notifications upon the creation or update of a resource request.

Purpose

The purpose of this component is to notify relevant stakeholders about resource request activities by generating Resource Request Notifications.

Features

  • Creates notifications for resource request events.
  • Supports both the creation and update of resource requests.

Activation

This component is activated whenever a resource request is created or updated.

Class Sensei_Notification_Timesheet

Summary

This component is designed to manage Timesheet Notifications triggered upon the creation or update of timesheets.

Purpose

The purpose of this component is to facilitate the generation of Timesheet Notifications, providing timely updates on timesheet-related activities.

Features

  • Generates Timesheet Notifications for both the creation and update of timesheets.

Activation

The component is activated in response to events involving the creation or modification of timesheets.

Class Sensei_PreventFiscaPeriodlOverlap

Summary

Manages Fiscal Periods to prevent overlap.

Purpose

This component is designed to handle Fiscal Periods and ensure that there is no overlap between them.

Features

  • Overlap prevention

Activation

This component is activated to enforce non-overlapping Fiscal Periods.

Class Sensei_PreventTimesheetDelete

Summary

Manages timesheet deletions with specific criteria.

Purpose

This plugin code runs whenever a timesheet is deleted, providing controlled deletion functionality.

Features

  • Timesheet deletion management
  • Admin-exclusive deletion of non-approved timesheets
  • Relaxed criteria for users to delete rows and data added to their active timesheet (as of 2021-11-26 update)

Activation

This plugin is activated when a timesheet deletion is initiated.

Class Sensei_PreventTimesheetOverlap

Summary

Manages Timesheets to prevent overlap.

Purpose

This component is designed to handle Timesheets and ensure that there is no overlap between them.

Features

  • Overlap prevention

Activation

This component is activated to enforce non-overlapping Timesheets.

Class Sensei_ProcessIncomingProjectData

Summary

Manages changes (Create or Update) to target entities for Dataflows with a focus on Project metadata.

Purpose

This Plugin is designed to handle changes in entities that serve as the target/destination for Dataflows. It specifically focuses on updating Project metadata based on incoming data.

Features

  • Entity change management for Dataflows
  • Processing of incoming data for Project metadata updates
  • Addressing corrupt data scenarios, especially related to missing sensei_tasks (as of 2022-11-08 update)

Activation

This Plugin is activated during changes (Create or Update) to the target entities of Dataflows.

Class Sensei_ProcessIncomingTaskData

Summary

Monitors create/update events on the target entity table of a task data flow and manages External Task records.

Purpose

This plugin is designed to monitor create/update events on the entity table targeted by a task data flow. It is responsible for updating or creating External Task records, which include references to the External System and External Project.

Features

  • Monitoring create/update events on the target entity table
  • Management of External Task records
  • Inclusion of references to External System and External Project

Activation

This plugin is activated during create/update events on the entity table targeted by a task data flow.

Class Sensei_ProcessResourceStateChange

Summary

Manages the 'End Date' field on the resource entity based on state changes.

Purpose

This plugin is designed to change the 'End Date' field on the resource entity, setting it to either NULL or Now() depending on the state (active/inactive). In the case of deactivation (inactive), it will update 'End Date' to Now() only if it is currently NULL.

Features

  • Management of the 'End Date' field on the resource entity
  • Dynamic setting based on state changes (active/inactive)
  • Utilizes pre-image to check statecode prior to the Update event to trigger further changes to the enddate field

Activation

This plugin is activated during the Update event on the resource entity.

Class Sensei_ProcessTaskQueue

Summary

Monitors create/update events on the target entity table of a task delta and manages interactions with the task sync entity.

Purpose

This plugin is designed to monitor create/update events on the entity table targeted by a task delta. It interacts with the task sync entity by either deleting an item or creating/updating it. The primary purpose is to limit the number of changes to adhere to API throttling limits.

Features

  • Monitoring create/update events on the target entity table
  • Interaction with the task sync entity
  • Item deletion, creation, or update based on events
  • Mitigation of changes to comply with API throttling limits

Activation

This plugin is activated during create/update events on the entity table targeted by a task delta.

Class Sensei_ProposalToProject

Summary

Manages the transition of a Proposal to a Project, handling associated data and historical roll-up fields.

Purpose

This Plugin addresses the scenario where a Proposal is transitioning to a Project. It is triggered when the Sensei Project field is populated on a Proposal record, typically through the Proposal Approval Flow. The primary objectives in this scenario are to switch Resource Request data from the Proposal to the Project and populate historical roll-up fields capturing essential information at the time of transition.

Features

  • Transition of Resource Request data from Proposal to Project
  • Population of historical roll-up fields, including:
  • Estimated Effort (Hrs)
  • Proposal Effort Start Date
  • Proposal Effort Finish Date
  • Proposed Cost
  • Proposed Sell
  • Switching of Sell Rate Override records from Proposal to Project (as of 2021-09-20 update)

Activation

This Plugin is activated when the Sensei Project field is populated on a Proposal record.

Class Sensei_TaskRollup

Summary

Manages the roll-up of task-related data for projects without a Primary external project.

Purpose

This function is designed to be called from a Dynamics Web Api Custom Action (sensei_taskrollup). It specifically runs for projects lacking a Primary external project and handles the setting of % Complete, Scheduled Finish, and Project Start Date at the project level. Additionally, it ensures that the FieldLock column is configured to prevent users from modifying the rolled-up fields.

Features

  • Roll-up of task-related data for projects without a Primary external project
  • Setting of % Complete, Scheduled Finish, and Project Start Date at the project level
  • Configuration of the FieldLock column to restrict user modifications

Activation

This function is designed to be called from a Dynamics Web Api Custom Action (sensei_taskrollup).

Class Sensei_TimesheetToFinanceSync

Summary

Manages the synchronization of timesheet data to finance, triggered by updates to timesheet records.

Purpose

This functionality is designed for the synchronization of timesheet data to finance. It is currently triggered by the update of a timesheet record. The primary objective is to process either an approval or rejection into financial items and transactions on the projects related to timesheet rows.

Features

  • Synchronization of timesheet data to finance
  • Triggered by updates to timesheet records
  • Processing of approvals or rejections into financial items and transactions on associated projects

Activation

This functionality is activated by updating a timesheet record.

Class Sensei_UnlinkExternalProject_DeleteTasks

Summary

Manages the deletion of a sensei_externalproject entity along with associated sensei_tasks and sensei_externaltasks.

Purpose

This function is intended to be registered as a custom action and called instead of a regular delete operation on a sensei_externalproject entity. Its primary function is to delete the external project record, along with all associated sensei_tasks and sensei_externaltasks.

Features

  • Deletion of sensei_externalproject entity
  • Deletion of associated sensei_tasks and sensei_externaltasks

Activation

This function is to be registered as a custom action and called in place of a plain delete of a sensei_externalproject entity.

Class Sensei_UnlinkExternalProject_OrphanTasks

Summary

Manages the deletion of a sensei_externalproject entity and breaks the relationship between associated sensei_tasks and sensei_externaltasks.

Purpose

This function is designed to be registered as a custom action and called instead of a regular delete operation on a sensei_externalproject entity. Its primary purpose is to delete the external project record and break the relationship between associated sensei_tasks and sensei_externaltasks, leaving the sensei_externaltask records in an unlinked state.

Features

  • Deletion of sensei_externalproject entity
  • Breaking the relationship between associated sensei_tasks and sensei_externaltasks
  • Sensei_externaltask records remain in an unlinked state

Activation

This function is to be registered as a custom action and called in place of a plain delete of a sensei_externalproject entity.

Class Sensei_ValidateRate

Summary

Manages the validation of create or update operations for Resource Sell Rate or Resource Cost Rate entities.

Purpose

This Plugin code is configured to run on Pre-Validation of a Create or Update of Resource Sell Rate or Resource Cost Rate. It enforces that create or update operations are only allowed for a unique set of Effective Date, Bookable Resource, Project, and Proposal.

Features

  • Validation of create or update operations for Resource Sell Rate or Resource Cost Rate entities
  • Unique set enforcement for Effective Date, Bookable Resource, Project, and Proposal

Activation

This Plugin is activated on the Pre-Validation stage of a Create or Update operation for Resource Sell Rate or Resource Cost Rate.

SenseiPlugin

Class Sensei_AttributeOwnershipAndRoles

Summary

Manages updates to Project, Program, or Portfolio entities, focusing on ownership and related Sensei entities.

Purpose

This Plugin is intended to run whenever Project, Program, or Portfolio is updated. Originally designed to execute only when Ownership of the project changes, it is now configured to run on every update, accommodating migration or catch-up scenarios. The primary objectives of this Plugin are to check Ownership, determine if the owner is an individual User or a Dynamics Team, grant the appropriate Security Role to that Dynamics Team (for ownership of Sensei entities), set ownership of related Sensei Entity records, and ensure the correct current Business Process Flow (BPF) stage value in the Current Status field (added 2020-02-20 to cater to scenarios where a new BPF has been created but hasn't been hooked up to that BPF entity Step/Message).

Features

  • Management of updates to Project, Program, or Portfolio entities
  • Ownership checks and adjustments
  • Granting of Security Roles to Dynamics Teams
  • Setting ownership of related Sensei Entity records
  • Ensuring correct current BPF stage value in the Current Status field
  • Inclusion of Programs, Portfolios, and Sensei Project (as of 2020-08-13, 2020-09-17, and 2020-10-19 updates)

Activation

This Plugin is intended to be activated on updates to Project, Program, or Portfolio entities.

Class Sensei_AttributeOwnershipFromBenefitItemParent

Summary

Manages updates to Benefit Items, focusing on ownership and related entities.

Purpose

This Plugin is intended to run whenever a Benefit Item is updated. It executes on every update, accommodating migration or catch-up scenarios. The primary objectives of this Plugin are to check Ownership of the Benefit's parent Project, Program, Portfolio, or SenseiProject, determine if the parent is owned by an individual User or a Dynamics Team, and set Ownership of related Benefit Output, Benefit Outcome, and Benefit Tracking records to be the User or Team that is the Owner of the parent Project/Program/Portfolio.

Features

  • Management of updates to Benefit Items
  • Ownership checks and adjustments
  • Setting ownership of related Benefit Output, Benefit Outcome, and Benefit Tracking records

Activation

This Plugin is intended to be activated on updates to Benefit Items.

Class Sensei_AttributeOwnershipFromFinancialItemProject

Summary

Manages updates to Financial Items, focusing on ownership and related entities.

Purpose

This Plugin is intended to run whenever a Financial Item is updated. It executes on every update, accommodating migration or catch-up scenarios. The primary objectives of this Plugin are to check Ownership of the Financial Item's Project, determine if the Project is owned by an individual User or a Dynamics Team, and set Ownership of related Financial Transaction records to be the User or Team that is the Owner of the Project.

Features

  • Management of updates to Financial Items
  • Ownership checks and adjustments
  • Setting ownership of related Financial Transaction records

Activation

This Plugin is intended to be activated on updates to Financial Items.

Class Sensei_AttributeOwnershipFromResourceRequestProject

Summary

Manages updates to Resource Requests, focusing on ownership and related entities.

Purpose

This Plugin is intended to run whenever a Resource Request is updated. It executes on every update, accommodating migration or catch-up scenarios. Note that this relates only to Atsumeru (it is not relevant to PFTW Edition). The primary objectives of this Plugin are to check Ownership of the Resource Request's Project, determine if the Project is owned by an individual User or a Dynamics Team, and set Ownership of related Resource Request Data or Resource Request Comment records to be the User or Team that is the Owner of the Project. As of the 2022-08-19 update, it also ensures that if the Name field is not populated on the Resource Request, it is set to the default value.

Features

  • Management of updates to Resource Requests
  • Ownership checks and adjustments
  • Setting ownership of related Resource Request Data or Resource Request Comment records
  • Population of default value for the Name field if not populated (as of 2022-08-19 update)

Activation

This Plugin is intended to be activated on updates to Resource Requests.

Class Sensei_AttributeOwnershipFromSenseiTaskProject

Summary

Manages updates to Project Tasks, focusing on ownership and related entities.

Purpose

This Plugin is intended to run whenever a Project Task is updated. It executes on every update, accommodating migration or catch-up scenarios. Note that this relates only to native Tasks in Atsumeru (it is not relevant to PFTW Edition). The primary objectives of this Plugin are to check Ownership of the Project Task's Project, determine if the Project is owned by an individual User or a Dynamics Team, and set Ownership of related Task Dependency or Resource Assignment records to be the User or Team that is the Owner of the Project.

Features

  • Management of updates to Project Tasks
  • Ownership checks and adjustments
  • Setting ownership of related Task Dependency or Resource Assignment records

Activation

This Plugin is intended to be activated on updates to Project Tasks.

Class Sensei_ConfigUpdate

Summary

Manages updates to Sensei Config Settings, focusing on specific actions for certain changes.

Purpose

This Plugin is intended to run whenever a Sensei Config Settings record is updated. It performs actions in instances where values for projectCustomRegisters, programCustomRegisters, or portfolioCustomRegisters are changed. The primary purpose is to ensure that the Roles referenced in those settings are applied to any existing owner teams of those parent records.

Features

  • Management of updates to Sensei Config Settings
  • Specific actions for changes in projectCustomRegisters, programCustomRegisters, or portfolioCustomRegisters
  • Application of Roles to existing owner teams of parent records

Activation

This Plugin is intended to be activated on updates to Sensei Config Settings.

Class Sensei_DeleteProtection_FinancialCategory

Summary

Manages the deletion of Financial Category records, preventing deletion under certain conditions.

Purpose

This Plugin is intended to run whenever a Financial Category record is deleted. Its primary purpose is to prevent the deletion of the Financial Category under the following conditions:

  • Associated as the Default Cost Category to a Project (Atsumeru only)
  • Associated as the Default Cost Category to a Bookable Resource (Atsumeru only)
  • Associated with the Configuration Setting System Default Cost Category (Atsumeru only)
  • Associated with a Financial Item

Features

  • Management of Financial Category record deletion
  • Prevention of deletion under specified conditions

Activation

This Plugin is intended to be activated on the deletion of Financial Category records.

Class Sensei_EnsureAccessForAssignedTo

Summary

Manages the creation or update of Sensei entities containing an Assigned To column, focusing on ownership and sharing.

Purpose

This Plugin is intended to run whenever a Sensei entity that contains an Assigned To column is created or updated. Its primary purpose is to check Ownership of the Entity record, verify if the Assigned To person is either the individual User owner of the record or a member of the Dynamics Team (if the owner is a Team), and share the record with the Assigned To person if they are neither the owner nor in the team.

Features

  • Management of the creation or update of Sensei entities with an Assigned To column
  • Ownership checks and sharing with the Assigned To person if needed

Activation

This Plugin is intended to be activated on the creation or update of Sensei entities with an Assigned To column.

Class Sensei_EnsureProjectRelationshipToProgramPortfolio

Summary

Manages the pre-validation check for updates to Projects, preventing conflicting relationships.

Purpose

This Plugin is intended to run whenever a Project is updated as a pre- validation check. Its primary purpose is to address scenarios where someone uses the 'Add Existing' button from a Project subgrid to add a Project to a Portfolio or Program. If the Project already has an existing relationship (e.g., related to a Program and the user is trying to create a Portfolio relationship), the Plugin provides feedback to the user and prevents the update.

Features

  • Pre-validation check for updates to Projects
  • Prevention of conflicting relationships during 'Add Existing'

Activation

This Plugin is intended to be activated on pre-validation checks for updates to Projects.

Class Sensei_GenericBusinessProcessFlowAudit

Summary

Manages the Create/Update event for business process flow entities.

Purpose

This Plugin is intended to be run on business process flow entities during the Create/Update event.

Features

  • Handling of Create/Update events for business process flow entities

Activation

This Plugin is intended to be activated on business process flow entities during the Create/Update event.

Class Sensei_GenericEntityRollup

Summary

Manages the rollup of a generic three-tiered entity structure.

Purpose

This Plugin is intended to be run on a generic three-tiered entity structure where the top tier needs to roll up the bottom tier effectively. It is meant to run only on the Middle Tier (to change all related bottom tiers) and the Bottom Tier. This Plugin requires JSON Config to be set within unsecure config.

Features

  • Rollup of a generic three-tiered entity structure
  • Middle Tier update triggers update of related Bottom Tier records
  • Bottom Tier change updates the background link to the Top Tier depending on the change to the Top or Middle Tier Lookups

Activation

This Plugin is intended to be activated on the Middle Tier as PostOp - Async on Update with a listener on the relationship field (e.g., sensei_portfolio). For the Bottom Tier, it should be registered as PreOp - Sync on Create/Update with listeners on the relationship fields (e.g., sensei_program, sensei_portfolio). The Bottom Tier will require a new field (lookup) to store this relationship (e.g., sensei_portfolio_link).

Class Sensei_InheritOwnershipFromProject

Summary

Manages the creation of records in a Sensei custom Entity, focusing on ownership and parent relationships.

Purpose

This Plugin is intended to be run whenever a new record is created in a Sensei custom Entity. It checks the Ownership of the Project that the record relates to and ensures that the Owner of the entity record being created is the same as for the parent Project, Program, or Portfolio.

Features

  • Management of new record creation in a Sensei custom Entity
  • Ownership checks and alignment with parent Project, Program, or Portfolio

Activation

This Plugin is intended to be activated whenever a new record is created in a Sensei custom Entity.

Class Sensei_PerformAssociationOnBehalfOfUser

Summary

Manages the creation of records in a Sensei custom Entity, focusing on ownership and parent relationships.

Purpose

This Plugin is intended to be run whenever a new record is created in a Sensei custom Entity. It checks the Ownership of the Project that the record relates to and ensures that the Owner of the entity record being created is the same as for the parent Project, Program, or Portfolio.

Features

  • Management of new record creation in a Sensei custom Entity
  • Ownership checks and alignment with parent Project, Program, or Portfolio

Activation

This Plugin is intended to be activated whenever a new record is created in a Sensei custom Entity.

Class Sensei_PreventProjectDeleteByNonAdmin

Summary

Manages the creation of records in a Sensei custom Entity, focusing on ownership and parent relationships.

Purpose

This Plugin is intended to be run whenever a new record is created in a Sensei custom Entity. It checks the Ownership of the Project that the record relates to and ensures that the Owner of the entity record being created is the same as for the parent Project, Program, or Portfolio.

Features

  • Management of new record creation in a Sensei custom Entity
  • Ownership checks and alignment with parent Project, Program, or Portfolio

Activation

This Plugin is intended to be activated whenever a new record is created in a Sensei custom Entity.

Class Sensei_ReassignOwnership

Summary

This code handles ownership reassignment logic for a specific entity in response to create or update events.

Purpose

The purpose of this code is to manage the transfer of ownership for a specific entity when create or update events occur. It ensures that the ownership is correctly reassigned based on the business logic and requirements.

Features

  • Ownership reassignment logic for a specific entity.
  • Handling create and update events to trigger ownership changes.

Activation

This functionality is activated in response to create or update events related to the specific entity for which ownership reassignment is necessary.

Class Sensei_SetProjectCurrentStage

Summary

This Plugin is designed to handle logic associated with changes in the Business Process Flow (BPF) stages for a Project.

Purpose

The purpose of this Plugin is to respond to changes in the current stage of a Project-related BPF. It performs several actions, including updating custom fields on the related Project entity based on the BPF changes.

Features

  • Sets the Current Stage custom field for the related Project to the current Stage value from the BPF entity.
  • Handles the completion of the BPF by setting the Current Stage value to a completed/finished state if the BPF has a completedon value.
  • Specifically designed to run from the Create/Update event on the BPF entity.
  • Supports custom BPFs, and adjustments were made on 2020-10-19 to cater for SenseiProject.

Activation

This Plugin is intended to be triggered whenever a Project-related BPF changes its current Stage. It should run from the Create/Update event on the BPF entity itself. Custom BPFs also need to be connected to the CRM Step.

Class Sensei_TagAssembly

Summary

This plugin is designed to run on the PreValidation event and is responsible for writing a SharedVariable to identify the source of the running code, distinguishing between SenseiPlugin.dll and SenseiAtsumeruPlugin.dll.

Purpose

The purpose of this plugin is to set a SharedVariable during the PreValidation event, indicating whether the running code originates from SenseiPlugin.dll or SenseiAtsumeruPlugin.dll. This differentiation is crucial for the subsequent PostOperation events, which use this variable to determine whether to execute their functions. By implementing this logic, the plugin ensures that each function runs only once, preventing redundancy when both products are installed in the environment.

Features

  • Runs on the PreValidation event.
  • Writes a SharedVariable to identify the source of the running code (SenseiPlugin.dll or SenseiAtsumeruPlugin.dll).
  • Ensures that PostOperation events make decisions based on the SharedVariable to avoid redundant execution when both products are installed.

Activation

This plugin should be activated on the PreValidation event.