Is it possible to trigger an inspection alert/email when a certain operation has been completed 1000 times? We have the Standard Quality Assurance Module but not the Enhanced Quality Module. Has anyone done anything similar?
Thanks,
Alison
Is it possible to trigger an inspection alert/email when a certain operation has been completed 1000 times? We have the Standard Quality Assurance Module but not the Enhanced Quality Module. Has anyone done anything similar?
Thanks,
Alison
It should not be too hard with code post processing on end activity.
What qualifies as 1000 times. Same job multiple jobs one opcode?
What do you want to happen at 1000?
Stop the next operation from starting before ?? is completed
Thanks Greg. It would be multiple jobs with the same opcode. We would like the product of the operation to be inspected after every 1000. So ideally our quality team would be sent an email informing them that the count had reached 1000. This would then be reset to zero. The next operation can continue as normal.
I think I need to add a UD field on the Opmaster table for the count, then increment the count on end activity. When it reaches 1000, send an email to the quality team and reset the count. I just wondered if there was a built-in option in Epicor to do the same thing.
I think this is too specific for anything built in, but you have a plan that sounds like it will work. I have code for emailing from end activity that we use for when a first article is completed if you want a sample.
Thanks Greg, that would be really helpful!
I have this condition then the code below on a standard data directive. This started in e9 and could use some cleanup, but it works.
/* alert is used when a first article job is completed */
foreach (var ttLaborDtlRow in ttLaborDtl)
{
string EmailAddress = string.Empty;
string UserName = string.Empty;
string SenderName = string.Empty;
string vFrom = string.Empty;
string vTo = string.Empty;
string vCC = string.Empty;
string vSubject = string.Empty;
string vBody = string.Empty;
string EMAIL_From = string.Empty;
string EMAIL_To = string.Empty;
string EMAIL_CC = string.Empty;
string EMAIL_Subject = string.Empty;
string EMAIL_Text = string.Empty;
Erp.Tables.UserFile UserFile;
Erp.Tables.JobHead JobHead;
Erp.Tables.LaborDtl LaborDtl;
Erp.Tables.Part Part;
UserFile =(from UserFile_Row in Db.UserFile
where UserFile_Row.DcdUserID == Session.UserID
select UserFile_Row).FirstOrDefault();
if(! String.IsNullOrEmpty(UserFile.EMailAddress))
{
EMAIL_From = "<"+UserFile.EMailAddress.Trim()+">";/* epicor user */
SenderName = UserFile.Name;
}
else
{
EMAIL_From = "<info@domain.com>";
SenderName = "Not Found";
}
JobHead = Db.JobHead.Where(JobHead_Row => JobHead_Row.Company == ttLaborDtlRow.Company && JobHead_Row.JobNum == ttLaborDtlRow.JobNum).FirstOrDefault();
Ice.Diagnostics.Log.WriteEntry("out " + ttLaborDtlRow.ClockOutTime.ToString());
if(ttLaborDtlRow.ClockOutTime != 24)
{
Part = Db.Part.Where(Part_Row => Part_Row.Company == JobHead.Company && Part_Row.PartNum == JobHead.PartNum).FirstOrDefault();
vBody = "First Article Job "+ttLaborDtlRow.JobNum+"\n\n\t Final Audit done by "+SenderName+"\n\n\tPart Number: "+ JobHead.PartNum.Trim()+"\n\n\tDescription: "+ Part.PartDescription.Trim()+"\n\n\tPart Class: "+ Part.ClassID.Trim();
if(Session.CompanyID.Contains("CEG"))
{
vTo = "<customerservice@domain2.com>";
vCC = "<info@domain.com>;<planner@domain2.com>;<planner2@domain2.com>";
}
else
{
vCC = "<info@domain.com>;<planner@domain.com>;<planner2@domain.com>";
if((Part.ProdCode.IndexOf("OM1")+1) != 0)
vTo = vTo+"<pm1@domain.com>;<csr1@domain.com>";
if((Part.ProdCode.IndexOf("OM2")+1) != 0)
vTo = vTo+"<pm2@domain.com>;<csr2@domain.com>";
if((Part.ProdCode.IndexOf("OM3")+1) != 0)
vTo = vTo+"<pm3@domain.com>;<csr3@domain.com>";
}
EMAIL_To = vTo;
EMAIL_CC = vCC;
EMAIL_Subject = "First article Audited: "+JobHead.PartNum.Trim();
EMAIL_Text = vBody;
Ice.Diagnostics.Log.WriteEntry(" Email Sent for First Article: "+ JobHead.JobNum.Trim());
Ice.Diagnostics.Log.WriteEntry("FINAUD checked for First Article: "+ JobHead.JobNum.Trim());
var mailer = this.GetMailer(async: true);
var message = new Ice.Mail.SmtpMail();
message.SetFrom(EMAIL_From);
message.SetTo(EMAIL_To);
var cc = "";
message.SetCC(EMAIL_CC);
var subject = EMAIL_Subject;
message.SetSubject(subject);
var body = vBody;
message.SetBody(body);
mailer.Send(message);
}
}
I think the way that I would do this is:
Above would be the “soft coded” setup.. you could populate the date with todays date, and the number of cycles as 1000.
THEN create a Query that searches the labor detail table for that operation or resource group and sums the number of completed parts since the referenced date above. If teh total is greater than the number of cycles count, then it would show that operation/resource…
THEN you would need to have an application (updatable dashboard) to reset the date once you have performed the inspection.
Thanks so much Greg - your help is much appreciated.
Thanks Tim. Always good to soft code!
hahah… just remembered my rant on the soft coding subject: STOP IT! (Rant warning here!) "Hard Coding vs Data Driven"