Maximo List Archive

This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.



re:[MAXIMO List] Communication Temp Attribute FROM email

From: ewald h. caspari (2015-06-10 18:11)

you can use a role for this. There are many ready roles which you can use as
example.

Regards
Ewald

-------------------------------
I am trying to create a communication template, that when chosen, will populate
the SEND FROM email addess with the currently signed on user's email address. I
have seen :affectedemail, and :reportedemail,, therefore trying many different
versions of :useremail, :&user&, etc. Any suggestions??


From: jwarren (2015-06-12 05:45)

I have NEVER found a way to use a ROLE for SEND FROM or REPLY TO. Maximo does not seem to allow this. If you have found a way, please post details.

We ended up using an automation script to solve this problem--not particularly graceful, but does get the job done.

In the COMM TEMPLATES, we use variables such as #OWNER# or #LISTENER# (for an e-mail listener address). We then have a script with a launchpoint of COMMTEMPLATE.SUBJECT (since it doesn't seem to fire on COMMTEMPLATEID or on the ADD event)...

* * * * * * * * * *

from psdi.server import MXServer;
S = "xxxyyy@zzz.com"
if (mbo.getOwner().getName()=='SR' or
mbo.getOwner().getName()=='ACTIVITY' or
mbo.getOwner().getName()=='CHANGE'):

P = mbo.getOwner().getString("OWNER");
Eset=MXServer.getMXServer().getMboSet("EMAIL",mbo.getUserInfo());
Eset.setWhere("PERSONID = '" + P + "'");
Eset.reset()
if (Eset.count() >= 1):
E = Eset.getMbo(0).getString("EMAILADDRESS");
else:
E = S;
elif (mbo.getOwner().getName()=='TKOWNERHISTORY'):
E = S;
elif (mbo.getOwner().getName()=='WOOWNERHISTORY'):
##Pull the activity
Aset = MXServer.getMXServer().getMboSet("WOACTIVITY",mbo.getUserInfo());
Aset.setWhere("WONUM = '" + mbo.getOwner().getString("WONUM") + "'");
Aset.reset()
ACT = Aset.getMbo(0);
##Determine whether it's attached to a ticket or a workorder (change)
if (ACT.getString("ORIGRECORDID") != ""):
Tset = MXServer.getMXServer().getMboSet("TICKET",mbo.getUserInfo());
Tset.setWhere("TICKETID = '" + ACT.getString("ORIGRECORDID") + "'");
Tset.reset()
P = Tset.getMbo(0).getString("OWNER");
if (P != ""):
Eset=MXServer.getMXServer().getMboSet("EMAIL",mbo.getUserInfo());
Eset.setWhere("PERSONID = '" + P + "'");
Eset.reset()
if (Eset.count() >= 1):
E = Eset.getMbo(0).getString("EMAILADDRESS");
else:
E = S;
else:
E = S;
elif (ACT.getString("PARENT") != ""):
Tset = MXServer.getMXServer().getMboSet("WORKORDER",mbo.getUserInfo());
Tset.setWhere("WONUM = '" + ACT.getString("PARENT") + "'");
Tset.reset()
P = Tset.getMbo(0).getString("OWNER");
if (P != ""):
Eset=MXServer.getMXServer().getMboSet("EMAIL",mbo.getUserInfo());
Eset.setWhere("PERSONID = '" + P + "'");
Eset.reset()
if (Eset.count() >= 1):
E = Eset.getMbo(0).getString("EMAILADDRESS");
else:
E = S;
else:
E = S;
else:
E = S;
else:
E = S;
## Process #OWNER# tag ##
vX = mbo.getString("SENDFROM");
vXu = vX.upper();
l = len(vX);
x = vXu.find("#OWNER#");
if (x != -1):
## Remove tag from the field
vX=vX[:x] + E + vX[x+7:l];
mbo.setValue("SENDFROM", vX);
## Process#LISTENER# tag ##
vX = mbo.getString("SENDFROM");
vXu = vX.upper();
l = len(vX);
x = vXu.find("#LISTENER#");
if (x != -1):
## Remove tag from the field
vX=vX[:x] + S + vX[x+10:l];
mbo.setValue("SENDFROM", vX);

## Process #OWNER# tag ##
vX = mbo.getString("REPLYTO");
vXu = vX.upper();
l = len(vX);
x = vXu.find("#OWNER#");
if (x != -1):
## Remove tag from the field
vX=vX[:x] + E + vX[x+7:l];
mbo.setValue("REPLYTO", vX);
## Process #LISTENER# tag ##
vX = mbo.getString("REPLYTO");
vXu = vX.upper();
l = len(vX);
x = vXu.find("#LISTENER#");
if (x != -1):
## Remove tag from the field
vX=vX[:x] + S + vX[x+10:l];
mbo.setValue("REPLYTO", vX);