kishan.kalariya - Friday, March 12, 2010 3:54 AM:
I want to put EMail notification on Attribute (property of an Item Type)if that attribute value Goes below mininmum level then email notifitaion alert should given to particular USER ....!!
How can i do this one ..?
Can anyone give any idea ..?
plz help me...!
PeterSchroer - Friday, March 12, 2010 7:50 AM:
Kishan,
Add a OnBeforeUpdate server event/method for that itemtype, in the method (VB or C#) look at the property and compare to your threshold. You then have 2 choices for emails.... you can use the .NET email object to send the email (if the target does not have an Aras Innovator account, or use the convenience functin on the Innovator object, but this is only for people with Innovator User items.
The .NET pseudo code looks like:
Dim email As New System.Net.Mail.MailMessage()
email.BodyEncoding = encoding
email.From = New System.Net.Mail.MailAddress( "[email protected]" )
email.To.Add( "[email protected]" )
email.Subject = emailItem.GetProperty("subject")
email.isBodyHtml = False
email.Body = emailItem.GetProperty("the threshol dis exceeded")
cco.email.setup_smtpmail_server_and_send(email)
Peter.
kishan.kalariya - Tuesday, March 16, 2010 9:12 AM:
Thanks ... :)
arun_cvs - Tuesday, August 28, 2012 8:45 AM:
Hi Kishan
I am New in Aras.I trying to send email Notification using Server-side method(C#) using your Code.But it.s not working,Error is occurred. Please Give Any other Solution for to send email notification Dynamically.
Thanks
Arun
kishan.kalariya - Wednesday, March 17, 2010 7:02 AM:
Hi,
Can u give me idea How can i show Log file in Aras ??
How can i know from where it shows error ...?
Logtrace kind of in Aras ...!!
Second thing ..!!
In method (C#,VB)i want to print any point value of varaible in (C# & VB) how can i display ...?
Harsha - Friday, August 31, 2012 1:38 AM:
Hi Arunkumar,
You can use the following code to send an E-mail notification.
Innovator inn = this.getInnovator();
Item res;
Item identity = inn.getItemById("Identity", "5A45B57F32D34B2EB730F6DE6AABAAE6"); 'the id of the user to whom you want to send the mail
res = inn.applyAML("<AML>"+
"<Item type='Email Message' action='get'>"+
"<name>MyMail</name>"+ 'name of your E-mail message
"</Item></AML>");
Item newEmail = res.getItemByIndex(0);
identity.email( newEmail, identity );
return inn.newResult("Done");
Run the server method , then you can see the result.
Before that configure your InnovatorServerConfig.xml file on the server for the correct SMTPServer. .
Regards
Harsha
arun_cvs - Saturday, September 1, 2012 5:47 AM:
Hi Harsha,
Thank u for replying.But i am tried this coding previously the following error occurred(Object Reference Not set to Instance of an object Error) at run the server method.I am Configure Correct SMTP server but I Don't know What's the problem.Please let me know any solutions.
Regards,
Arunkumar