@gpayne,
Thanks for confirming that itās possible through a BPM, any chance would you be willing to share your BPM?
@Vinaykamboj,
We do have departments assigned on the Employee Records, however we utilize capabilities for scheduling, and the scheduler assigns department based on the resource scheduled for a given operation, and that overrides the employee department, which is the problem.
Now that Iām back from Vegas and had some āfreeā time, I managed to work through creating a BPM to do what I needed. Iāll attempt to explain my requirement and how I tackled it for future reference.
We have 2 different Direct Labor āpoolsā; engineering and everyone else (MDL). These pools have different burden rates and have to be segregated for financial costing reasons.
The Facts:
Direct labor is directed to the GL via Departments
Burden Rates are set by Resource Group
We use the scheduling engine and capabilities to assign resources to an operation
MDL is never allowed to clock into Engineering Ops
Engineering is allowed to clock into non-engineering ops, but must use their GLās & Burden
Normal functionality is that anyone can clock into an ops even if it is not assigned to them, however, the scheduled resource, resource group, and JCDept stay the same.
I created a Method Directive BPM on Labor.Update Pre-Processing, which Invokes the Erp.Labor.OverridesResource BO method, if;
(the CapabilityID equal āDesignā, which is the Engineering Capability OR
The only piece of custom code in this BPM is the JCDept=ENG condition, because I couldnāt get it to work with a BAQ⦠The code is:
Summary
foreach(var LaborDtl in (from LaborDtl_Row in ttLaborDtl
select LaborDtl_Row))
{
foreach(var PREmpMas in (from row in Db.PREmpMas
where row.Company == Session.CompanyID && LaborDtl.EmployeeNum == row.EmpID
select row))
{
if (PREmpMas != null)
{
if (PREmpMas.JCDept == "EngGroup")
{
return true;
}
return false;
}
return false;
}
return false;
}
return false;
Iāve tested this with a bunch of different scenarioās and if seems to work perfectly, as long as the engineers are a resource in the capabilities they are clocking into.