Sales Order Acknowledgment (Print with Routing)

Yes, I agree with you.
However in this case the information resides for one day and then purged.
SysRptLst is the last of the 3 tables to be populated it seems.
So I am able to capture the needed information and Update the OrderHed.
I will post the completed project below.

Thank you again, I couldn’t have got there without your help!

Here is my Completed Project.

and the Custom Code to Update the OrderHed

Ice.Tables.SysTaskParam TaskParam;
Erp.Tables.OrderHed OrderHed;
foreach (var ttSysRptLst_iterator in (from ttSysRptLst_Row in ttSysRptLst
                                   where (string.Equals(ttSysRptLst_Row.RowMod, IceRow.ROWSTATE_ADDED, StringComparison.OrdinalIgnoreCase) || string.Equals(ttSysRptLst_Row.RowMod, IceRow.ROWSTATE_UPDATED, StringComparison.OrdinalIgnoreCase))
                                   select ttSysRptLst_Row))                           
             

    {   
  
  
      var ttSysRptLstRow = ttSysRptLst_iterator;
      
      
      TaskLog = (from SysTaskLog_Row in Db.SysTaskLog
                    where  (SysTaskLog_Row.SysTaskNum == ttSysRptLstRow.SysTaskNum )
                    && SysTaskLog_Row.MsgText.Contains("Email")
                    select SysTaskLog_Row).FirstOrDefault();
      
      TaskParam = (from SysTaskParam_Row in Db.SysTaskParam
                    where  (SysTaskParam_Row.SysTaskNum == ttSysRptLstRow.SysTaskNum )
                    && SysTaskParam_Row.ParamName == "OrderNum"
                    select SysTaskParam_Row).FirstOrDefault();
      
      OrderHed = (from OrderHed_Row in Db.OrderHed
                      where string.Compare(OrderHed_Row.Company, ttSysRptLstRow.Company, true) == 0
                      && OrderHed_Row.OrderNum == TaskParam.ParamInteger
                      
                      select OrderHed_Row).FirstOrDefault();
                       
      
      
      
        if (ttSysRptLstRow != null && TaskLog.IsError == false);
        
        OrderHed.SO_AckLog_c = OrderHed.SO_AckLog_c + "SO_AckDate: " + ttSysRptLstRow.CreatedOn + " -User: " + ttSysRptLstRow.UserID +  " -EmailTo:" +ttSysRptLstRow.EMailTo + " -EmailCC: " + ttSysRptLstRow.EMailCC + " -EmailBCC: " + ttSysRptLstRow.EMailBCC+ " -Format: " + ttSysRptLstRow.SSRSRenderFormat + Environment.NewLine ;
      
      }

I emailed the SalesOrderAcknowledgement twice to see the results

4 Likes