Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gentran Server for Windows Email from a map ? 1

Status
Not open for further replies.

leprikon

IS-IT--Management
Jan 29, 2003
20
US
Hi we're using Gentran v4 & JDEdwards OneWorld Xe. I'm trying to add an email to the map so that when the 850 or 860 comes in, Gentran will create the flat file for JDE and fire off an email to an operator to verify that the po# with the detail lines in the email are matched with the genterated JDE EDI order.

The maps are done .. but the managers are requesting that they print out the original edi to verify the order .. i want them to just verify it against an email and delete the email. I'm looking to do the following :

Subject : EDI order received from partner : EDIPartner.

PO # 12345678

Line 1 500 CN 12345 $45.00
Line 2 100 CN 12323 $56.00
Line 3 50 CN 21212 $50.00
Line 4 7 CN 09020 $46.00
 
Hello leprikon,

One way of doing this is to have Gentran write data to the audit log. You would have to add the following extended rule on the Output side of your map; Ex:

auditlog(113,0,0,#OrderNum);

113 is the MessageID that you will setup under configuration > Audit Messages. You need to create a new one and check the 'Write to Audit log' box. Under the Audit Message Definition box, in the 'Message Text' field, you can write:

Purchase order #%1 has been received... (The %1 will be replaced by the first field from your extended rule (#OrderNum).

#OrderNum is the field receiving the data.

Once the translator writes the data on the audit log, you can create a new e-mail notification and reference the MessageID (113 in this case) and send the data to users via e-mail.

This is not the best solution since you will get 1 e-mail per line and it's pretty limited but it works.

__________________________________________________________

It is very easy on the outbound side to map from any format to a flat file and then send it via e-mail but from the inbound side, this is the only way I know!

Does anyone have other ideas?
Thanks!
J [thumbsup2]
 
i get the following :

auditlog(113,0,0,#OrderNum);

- OrderNum is not a member of output
- expected a string

 
Has you thougth of using the ActiveX funtionality of Extended Rules.

You could create an instance of an ActiveX Outlook.Application class and send an email. Might take some work throughout the map?? I haven't used this yet but am very intrigued by it.

Here is some notes from the pdf user guide...

--createobject--
Introduction :
The createobject function enables you to create an instance of an ActiveX Automation Server.

Syntax :
Code:
object = createobject("ProgID");
where: ProgID = programmatic identifier
Example object ob;
ob = createobject("InternetExplorer.Application");
//Creates an instance of the default interface of an ActiveX
//Automation Server.
//Note:
//The createobject command is more efficient if you use the IID
//instead of the interface name.
 

I have completed prototyping the activeX email ... it works GREAT!!! Had some issues at first but now it works great - I'm very excited about the possibilities!

--set up global string[255] msg; in the session extended rules
--concatenate #elements along with hardcoded text throughout the map to msg
--set up an outlook.application object in the "on end" session extended rule and use the send() method of the outlook object.

NOTE: when creating a mail msg use ol.createitem(0) instead of ol.createitem(olmailitem).

Have fun!!
 
RE: JFLandry 5/26/03 - I found this post very helpful and got this working.

RE: Leprikon 6/6/03 - verify the name of your output field in the name portion of element properties; and be sure to convert your real or int Order Number to string via the ntoa function. Hope this helps.
 
This method seems to work if we manually export the data. But when setup thru proccess control i get an error stating :

Other ActiveX error: no system message defined Method: Send On End Rule, group name = %1

Here is the end rule :

object oOutlook;
object oMail;

oOutlook = createobject("Outlook.Application");
oMail = oOutlook.createitem(0);
oMail.Body = EmailLineTemp;
oMail.Recipients.Add ("edi@domain.com");
oMail.Send();
oOutlook.Quit();

deleteobject(oMail);
deleteobject(oOutlook);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top