Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

Timesheets Business Portal

Posted on by 45

Hi All,

Can anyone help please? I have an issue where weekly timesheets are being used. By doing that it allows users to submit duplicate timesheets for the same week from the web application. Now we are facing a problem that users are submitting duplicate timesheets for the same days sometimes twice or 3 times a day and approvers get them approved.

Is there an easy way to to overcome this problem? Example: when a user tries to create a duplicate timesheet, a warning message pops warning them.

Regards,
Annmarie.

*This post is locked for comments

  • Suggested answer
    George Thomas Profile Picture
    George Thomas 10 on at
    RE: Timesheets Business Portal

    Hi Ann

    If you have access to the application code then a check can be added before record is inserted in the application itself. or

    the other solution which we did to overcome duplicate timesheet is to create a trigger on the database table. We haven't implemeted this solution yet to be tested on UAT.

    /****** Object:  Trigger [dbo].[trg_DuplicateTS]    Script Date: 07/18/2013 15:23:28 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    Create TRIGGER [dbo].[trg_StopDuplicateTS] ON [dbo].[PDK10000] FOR insert

    AS

    DECLARE @A INT

    SET @A=(

    SELECT TOP 1 substring(T1.PDK_TS_NO,LEN(T1.PDK_TS_NO),1)

    FROM inserted AS T1

    JOIN [PDK10000] AS T2

    ON substring(T1.PDK_TS_NO,1,LEN(T1.PDK_TS_NO)-1)=substring(T2.PDK_TS_NO,1,LEN(T2.PDK_TS_NO)-1)

    ORDER BY substring(T1.PDK_TS_NO,LEN(T1.PDK_TS_NO),1) DESC)

    print @A

    IF(@A>1)

    BEGIN

    ROLLBACK TRAN

    RAISERROR('Timesheet Already Exists Duplicates Are Not Allowed',16,1)

    END

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans