The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss using & developing the legacy SalesLogix Web Client (For versions 7.0 and earlier). View the code of conduct for posting guidelines.
|
|
|
|
How To Modify Copy Opp Info To Email Contents
Posted: 14 May 08 6:29 PM
|
I am confused. I want to modify the message of the body of this email. It appears it is being generated by xml. Here is the code from oppinfo.htm. How do these pieces work together? Where can I modify the xml being used to create the message body?
Sub email() Dim CADObject, CObject, xmlhttp
on error resume next
Set objOutlook = GetObject(,"Outlook.Application")
If error.num <> 0 Then Set objOutlook = CreateObject("Outlook.Application") error.clear End If
Set NS = objOutlook.GetNamespace("MAPI") NS.Logon
Set objOutlookMsg = objOutlook.CreateItem(0)
vURL = "<#SYS name=swcpath>/view?name=opportunity&oppid=<#AF name=id>" Set xmlhttp = CreateObject("Microsoft.XMLHTTP") xmlhttp.Open "GET", vURL, false xmlhttp.Send if (document.body.debug = "true") then msgbox xmlhttp.responseText end if msg = xmlhttp.responseText
while InStr(msg, "") > 0 value = mid(msg, InStr(msg, "") + 6, InStr(msg, "") - InStr(msg, "") - 6) 'value = formatCncy(value, "<#SYS name=multicurrency>","1", "") 'we are not passing exchange rate information because the script that generated this handled that information. value = convertCurrency(value) oldVal = mid(msg, InStr(msg, ""), InStr(msg, "") - InStr(msg, "") + 7) msg = Replace(msg, oldVal, value) wend while InStr(msg, "") > 0 value = mid(msg, InStr(msg, "") + 6, InStr(msg, "") - InStr(msg, "") - 6) value = convertDate(trim(value)) oldVal = mid(msg, InStr(msg, ""), InStr(msg, "") - InStr(msg, "") + 7) msg = Replace(msg, oldVal, value) wend
objOutlookMsg.Subject = "" 'objOutlookMsg.Body = msg objOutlookMsg.HTMLBody = msg
objOutlookMsg.Save objOutlookMsg.Display(true)
Set ObjOutlook = Nothing Set ObjOutlookMsg = Nothing 'top.donotrefresh = false End Sub
Thank you, Daryl Probetts |
|
|
|
Re: How To Modify Copy Opp Info To Email Contents
Posted: 14 May 08 7:26 PM
|
Daryl,
The web template opportunity is nothing but a pointer to the web action "genopportunity" which looks as if it's returning HTML (not XML) for a dashboard of sorts with the basic opportunity info as the message body.
It looks as if you need to modify the web action "genopportunity" to include what you want. But realize that if the action "genopportunity" or the view "opportunity" is referenced elsewhere, changing "genopportunity" will change it there, too. In other words, changing genopportunity may affect more than one place. I don't know for sure, just a caveat.
Jeff
|
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|