Hey, thanks for the great video! I've tried to use the no code method to setup an email notification when a PO is either rejected or approved. Doesn't seem to want to play ball! Any tips?
@CodaBears2 жыл бұрын
Depends on what isn't working. Make sure your item is being called by putting in a message. Then you'll know if you have a problem with your item being activated, or if it is strictly the email piece that isn't working. For example, if you have a condition, the put the message after your condition so that you know it is being hit.
@AndrewLe-me4kx2 жыл бұрын
Hi - how about when I need it to send an email when a field's value equals X then send to this user, and if it equals Y send to this user? What condition is best for that?
@CodaBears2 жыл бұрын
have a variable to store the email address. Then do a condition on the field to set the variable to the appropriate email address.
@jhdabest Жыл бұрын
HI, Can I know this email can send with attachments?
@CodaBears Жыл бұрын
Here is some sample code we did in Kinetic 2022.1 //Email via code, tested on Kinetic 2022.1 string vFrom = "fromAddress@email.com"; string vTo = "toAdrress@email.com"; string vCC = ""; string vSubject = "Subject Here"; string vBody = string.Empty; var mailer2 = this.GetMailer(async: true); var message2 = new Ice.Mail.SmtpMail(); try { foreach (var ttJobHead_iterator in (from ttJobHead_Row in ds.JobHead where (string.Compare(ttJobHead_Row.Company, callContextClient.CurrentCompany, true) == 0) && (ttJobHead_Row.Updated()) select ttJobHead_Row)) { var jobRow = ttJobHead_iterator; if(jobRow.JobReleased == false) { vBody = string.Format(@"Job Number {0} was unreleased by {1}!", jobRow.JobNum, callContextClient.CurrentUserId); message2.SetFrom(vFrom); message2.SetTo(vTo); message2.SetCC(vCC); message2.SetSubject(vSubject); message2.SetBody(vBody); //These next 3 lines are the part of code that changes from the video to allow attachments Dictionary attachments = new Dictionary(); attachments.Add("file.extension", @"\\myServer\myFolder\myFile.extension"); mailer2.Send(message2, attachments); } } } catch (Exception ex) { this.PublishInfoMessage(ex.Message, Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, "ChangeJobHeadJobReleased", "Email Via Code"); }
@ITAdministrator-jt2gi Жыл бұрын
How to setting email on Epicor.
@CodaBears Жыл бұрын
I'm not sure what you're asking. You can specify the email settings in Epicor. Depending on your version, the location for these change. You can look at your online help for your version's instructions.