Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, May 8, 2024 
 
slxdeveloper.com Community Forums  
   
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!
 Web Forums - SalesLogix Web Client (Pre-7.2)
Forum to discuss using & developing the legacy SalesLogix Web Client (For versions 7.0 and earlier). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Client (Pre-7.2) | New ThreadView:  Search:  
 Author  Thread: How To Modify Copy Opp Info To Email Contents
Daryl Probetts
Posts: 45
 
How To Modify Copy Opp Info To Email ContentsYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: How To Modify Copy Opp Info To Email ContentsYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 5/8/2024 3:05:23 PM