C# Labor Detail not showing up in Time & Expense Entry

I have created code in Visual Studio to create a new Labor Header, and then a new Labor Detail. I added in the information, but it will not appear in the Time and Entry Expense detail view. In Sql, the time entry is listed correctly. How can I adjust the code to make it appear in TE entry?

Are you setting the proper PayrollDate\ClockInDate? Correct emp?

Thank you for your reply.
I have created a record in TE entry and in code on a different date. When looking at each record in SQL, the clock in date matches the payroll date for both entries with the same employee ID.

I suggest sharing your creation code for header\detail so we can take a peek.

LaborDataSet ds = new LaborDataSet();
LaborImpl Proxy = Ice.Lib.Framework.WCFServiceSupport.CreateImpl(sessionerpcon, LaborImpl.UriPath);

            DateTime _datetest = Convert.ToDateTime("10/17/2019");

            Proxy.GetNewLaborHed(ds);
            if(ds.LaborHed.Count>0)
            {
                ds.LaborHed[0].EmployeeNum = "9999";
                ds.LaborHed[0].ClockInDate = _datetest;
                ds.LaborHed[0].Shift = 180;
                Proxy.Update(ds);
                var _hedseq = ds.LaborHed[0].LaborHedSeq;
                                 
                Proxy.GetNewLaborDtl(ds, _hedseq);
                
                if(ds.LaborDtl.Count > 0)
                {
                    ds.LaborDtl[0].LaborType = "I";
                    ds.LaborDtl[0].LaborTypePseudo = "I";
                    ds.LaborDtl[0].ClockInDate = _datetest;
                    ds.LaborDtl[0].LaborHrs = 8;
                    ds.LaborDtl[0].BurdenHrs = 0;                          
                    ds.LaborDtl[0].IndirectCode = "401";
                    ds.LaborDtl[0].ExpenseCode = "401";
                    ds.LaborDtl[0].TimeStatus = "S";
                    ds.LaborDtl[0].JCDept = "06";
                    ds.LaborDtl[0].ResourceGrpID = "06";
                    ds.LaborDtl[0].LaborNote = "This is a test of labor detail";
                    ds.LaborDtl[0].AsOfDate = _datetest;
                    ds.LaborDtl[0].ApprovedDate = _datetest;
                    ds.LaborDtl[0].PayrollDate = _datetest;
                    ds.LaborDtl[0].Imported = true;
                    ds.LaborDtl[0].ImportDate = _datetest;
                    ds.LaborDtl[0].GLTranDate = _datetest;
                    ds.LaborDtl[0].CreateDate = _datetest;
                    ds.LaborDtl[0].ChangeDate = _datetest;
                    ds.LaborDtl[0].DtClockIn = Convert.ToDateTime("10/17/2019 08:00");
                    ds.LaborDtl[0].DtClockOut = Convert.ToDateTime("10/17/2019 09:00");
                    ds.LaborDtl[0].ActiveTrans = false;
                    
                    Proxy.Update(ds);

I found where my error was. I was not filling enough data out on the header record. I added more data to it, and now it shows up. Thank you for looking into it for me. I apologize for wasting your time.

I know this was many years ago, but i’m in the same boat. I’ve filled out all the information that’s in the trace, but i’m still getting a header and no detail. Any pointers? :eyes: :pleading_face: