Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL forum
Answered

SL 2018 CU5 Time Card Status TM.TCS.00 - Displays Inactive Employees

Posted on by 90

Time Card Status TM.TCS.00

SL2018 CU5  Windows 10 client fully patched / updated as of 4/01/2021

SQL 2019 Version 15.0.2080.9 Application Database Compatibility Level SQL Server 2014 (120)

Behavior change from SL 2015 CU2

When selecting the option "Entire Company" the grid is populated with employees that haven't been active in years, some of whom are not even setup in Employee and Resource Maintenance.

Further it appears that the stored procedure PJLABHDR_Spk74 was changed sometime between SL2015 CU2 and SL2018 CU5.  To restore the behavior back to SL2015 CU2 I basically changed the WHERE CLAUSE in SL2018 CU5 to match the WHERE CLAUSE in SL2015 CU2.

So My question is why was this change made?  Have I created new concerns in SL2018 CU5 by changing this WHERE CLAUSE to match the where clause in SL2015 CU2?

-- SL2018 CU5
create procedure [dbo].[PJLABHDR_Spk74] @parm1 varchar (10), @parm2 varchar (250) , @parm3 smalldatetime , @parm4 smalldatetime , @parm5 varchar(100)
WITH EXECUTE AS '07718158D19D4f5f9D23B55DBF5DF1'
as
select e.manager1, e.manager2, e.gl_subacct, e.emp_name, e.employee, h.period_num,
h.week_num, e.emp_status, e.date_hired, e.date_terminated, h.le_type, h.le_status,
h.docnbr, s.emp_name, m.emp_name, h.pe_date, h.le_id07, e.cpnyID
from pjemploy e
left outer join pjlabhdr h
on e.employee = h.employee
and h.le_status <> 'X'
left outer join pjemploy s
on e.manager1 = s.employee
left outer join pjemploy m
on e.manager2 = m.employee
where e.cpnyid like @parm1 and
e.emp_status <> 'P' and
(e.date_terminated is null or e.date_terminated = ' ' or
e.date_terminated >= @parm3) and
e.date_hired <= @parm4 and
e.cpnyid in (select cpnyid from dbo.UserAccessCpny(@parm5))
order by e.emp_name, e.employee, h.period_num, h.week_num
GO


-- SL2015 CU2
create procedure [dbo].[PJLABHDR_Spk74] @parm1 varchar (10), @parm2 varchar (250) , @parm3 smalldatetime , @parm4 smalldatetime , @parm5 varchar(100)
WITH EXECUTE AS '07718158D19D4f5f9D23B55DBF5DF1'
as
select e.manager1, e.manager2, e.gl_subacct, e.emp_name, e.employee, h.period_num,
h.week_num, e.emp_status, e.date_hired, e.date_terminated, h.le_type, h.le_status,
h.docnbr, s.emp_name, m.emp_name, h.pe_date, h.le_id07, e.cpnyID
from pjemploy e
left outer join pjlabhdr h
on e.employee = h.employee
left outer join pjemploy s
on e.manager1 = s.employee
left outer join pjemploy m
on e.manager2 = m.employee
where e.cpnyid like @parm1 and
e.emp_status <> 'P' and
(e.date_terminated is null or e.date_terminated = ' ' or
e.date_terminated >= @parm3) and
h.le_status <> 'X' and
e.date_hired <= @parm4 and
e.cpnyid in (select cpnyid from dbo.UserAccessCpny(@parm5))
order by e.emp_name, e.employee, h.period_num, h.week_num
GO

  • Verified answer
    Eric Fintel Profile Picture
    Eric Fintel 90 on at
    RE: SL 2018 CU5 Time Card Status TM.TCS.00 - Displays Inactive Employees

    Indeed you are absolutely correct.  All unwanted resources that were displayed in Time Card Status did not have a termination date.  Entering a termination date corrected this issue.  This change in behavior from SL2015 CU2 is consistent with the online documentation for the Termination Date field found in Employee and Resource Maintenance which states in part ... Although this field is optional, it affects the list of resources that appears in Timecard Status.

    So in fact we were taking advantage of a bug in SL2015 CU2 that no longer exists in SL2018 CU5.

    I have entered termination dates and reverted the stored procedure PJLABHDR_Spk74 back to the original that came with SL2018 CU5.

    Thank you very much for your prompt feedback regarding this thread.

  • Suggested answer
    CFROTON Profile Picture
    CFROTON 4,710 on at
    RE: SL 2018 CU5 Time Card Status TM.TCS.00 - Displays Inactive Employees

    Dear Eric,

    I can't answer why it was changed in CU5, I'm not seeing a specific change or bug documented.

    Do the inactive employees have a termination date or hire date? I believe that screen uses the termination date to determine if an employee should not show on that screen.

    I tested this by making an employee inactive (they didn't have any recent timecards in the current year anyway), and they still show. Then I put in a termination date of 01/1/2020, and the employee no longer appears.

    Best Regards,

    Jana MacDonald

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,995 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,610 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans