on 06-07-2013 11:55 PM
Hi Everybody
I'm investigating about how to send notifications mails after an operation, I found a BO named "EmailActivity", apply the example code but I don't understand where it takes the mail I don't have errors in the syntaxis, but in the moment of run the code shows this message:
import ABSL;
import AP.FO.Activity.Global;
//EmailActivity: Root node
var elEmailRoot : elementsof EmailActivity;
var instEmail;
// EmailActivity: define party node
var elEmailParty : elementsof EmailActivity.Party;
var instParty;
// EmailActivity: define service order text collection
var TXT_TYPE_BODY_TEXT = "10002";
var elEmailTxtCollTxt: elementsof EmailActivity.TextCollection.Text;
var elEmailTxtCollTxtCntnt: elementsof EmailActivity.TextCollection.Text.TextContent;
var instEmailTxtColl;
var instEmailTxtCollTxt;
// EmailActivity: maintain description - mandatory
elEmailRoot.Name.content = "PSM CRM ABSL Test - CallEmailExample Example_01";
// EmailActivity: create new instance
instEmail = EmailActivity.Create(elEmailRoot);
// Email: Organizer party - mandatory
if (! instEmail.MessageFromParty.IsSet()) {
elEmailParty.PartyKey.PartyID.content = "00163E0312B41EE2B3A85F4B8DB6EEFE";
//elEmailParty.AddressReference.AddressHostUUID.content
instEmail.MessageFromParty.Create(elEmailParty);
}
// Email: Set Employee Responsible mandatory
if (! instEmail.EmployeeResponsibleParty.IsSet()) {
elEmailParty.PartyKey.PartyID.content = "00163E0312B41EE2B3DA1D0FADD9E7FB"; // Set Employee ID
instEmail.EmployeeResponsibleParty.Create(elEmailParty);
}
// Create a text of type "Body Text"
instEmailTxtColl = instEmail.TextCollection.Create();
elEmailTxtCollTxt.TypeCode.content = TXT_TYPE_BODY_TEXT;
instEmailTxtCollTxt = instEmailTxtColl.Text.Create(elEmailTxtCollTxt);
elEmailTxtCollTxtCntnt.Text.content = "Texto del e-mail";
instEmailTxtCollTxt.TextContent.Create(elEmailTxtCollTxtCntnt);
How to send automatically notification email?
The instances of the EmailActivity business object that were successfully saved, can be found in work center "Account Management" -> View "Activities".
Best regards,
Kornelia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everybody,
I found the solution, You have the right answer.
The email address in the system needed to be configured and i added the "send" action.
Thank you!
instEmail.Send();
Regards!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I'm not sure if your instance is created correctly, but if it is, you're never using the "Send" action
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.