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!
|
|
Inserting Notes/History via Web Services
Posted: 31 Jul 06 2:17 PM
|
fiogf49gjkf0d I'm trying to insert notes in SLX via web services. I can't seem to get carriage returns to work correctly. My notes are inserted into SLX and can be viewed but instead of line breaks, I see little unsupported character squares. Any ideas on how to this to work? I'm inserting paragraphs of text and need the line breaks to show for readability. Thanks!
|
|
|
|
Re: Inserting Notes/History via Web Services
Posted: 31 Jul 06 2:24 PM
|
fiogf49gjkf0d Usually that is caused by not using a complete CRLF for the carriage returns. A carriage return needs to be a char 13 AND a char 10 (in that order). Using only one char 13, or only a char 10 can cause the problem you describe. Also by using them in the wrong order you will see that same problem (ie: using the 10 then the 13).
If this is a .NET web service, then you can use the Environment.NewLine for all carriage returns to avoid any problems. Otherwise, you can use (for C#) "\r\n" or for VB/VB.NET Chr(13) & Chr(10).
Make sense? Let me know if you *are* using 13+10 or some equivalent and still seeing the problem.
-Ryan |
|
|
|
Re: Inserting Notes/History via Web Services
Posted: 31 Jul 06 2:39 PM
|
fiogf49gjkf0d I appreciate the quick reply...
I'm using ColdFusion MX 7.02 to call the .NET web service. Here's the ColdFusion code I use to compose the note:
<cfset crlf = chr(13) & chr(10)>
<cfset noteBody = "" /> <cfset noteBody = noteBody & "This is line one." & crlf /> <cfset noteBody = noteBody & "This is line two." & crlf /> <cfset noteBody = noteBody & "This is line three." & crlf /> <cfset noteBody = noteBody & "This is line four." & crlf />
The note appears in SLX as: "This is line one.xxThis is line two.xxThis is line three.xxThis is line four.xx" where the x's represent unsupported characters. If I copy and past the note out of SLX and into notepage, the line breaks are there. Is this just a display issue in SLX?
Any other ideas on how to troubleshoot? We're running SalesLogix 6.2.0.1474.
Thanks in advance!!!
Merritt
|
|
|
|
Re: Inserting Notes/History via Web Services
Posted: 31 Jul 06 2:41 PM
|
fiogf49gjkf0d Looks like my code was stripped out... I'll again below:
<.cfset crlf = chr(13) & chr(10).>
<.cfset noteBody = "" /> <.cfset noteBody = noteBody & "This is line one." & crlf /.> <.cfset noteBody = noteBody & "This is line two." & crlf /.> <.cfset noteBody = noteBody & "This is line three." & crlf /.> <.cfset noteBody = noteBody & "This is line four." & crlf /.> |
|
|
|
Re: Inserting Notes/History via Web Services
Posted: 31 Jul 06 2:44 PM
|
fiogf49gjkf0d Maybe try using something else from the CF code, like a "|" or something, then replace that with Environment.NewLine in the .NET Web Service?
(BTW, I insert notes into SLX all the time with line breaks, so I know it works, just somehting getting scrambled in the process here or something) |
|
|
|
Re: Inserting Notes/History via Web Services
Posted: 01 Aug 06 11:33 AM
|
fiogf49gjkf0d FYI... I found a workaround for this.
After many attempts, I was able to insert a note into SLX that retained line breaks. Afre reviewing the message, I realized that the key to making the message wrap was the inclusion of special characters in the message, specifically the ampersand. If I removed the ampersand from the first line, the rest of the message would show unsupported characters as line breaks. If I put '&' in the first line of the message, the text displayed correctly.
So I've resorted to starting all my messages with an ampersand as the first line. It's a messy fix in my opinion, but at least the notes are legible.
Thanks again for your input.
MC |
|
|
|