Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, August 18, 2025 
 
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!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Opportunity Mail Merge and Custom Fields (TABLES)
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Opportunity Mail Merge and Custom Fields (TABLES)Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Jan 08 11:41 AM
1. Is there a way to populate XX custom mail merge Opportunity Fields with only ONE SQL Statement? Store the data needed in a RecordSet......and then go after this recordset in each FIELD call of SLX Mail Merge OnCustomFieldName .....but how do you know to fetch the new data? Right now I do a GETFIELD.....but this is XX number of connections (albeit pooled) and SELECT queries.....ouch.

2. Using oTable and oRange stuff to write a table to the word document.....
a) does anyone how to use more custom formats....say Yellow for a header color instead of blue...

b) how do you do Nested Tables? Specifically I have a list of Sites for each Opp Product.... I'd like to print this out as a row of text (Opp Product) and then say 50 rows for the Sites.....the trouble is the next iteration of the Opp Product....I don't have a way to reset oTable, oRange in the same SLX Mail Merge OnCustomFieldName ????

Do I need to do all of this in the SDK?

Thanks!
RJ Samp

'''This works, BTW, simply insert a new custom field in the Word Doc 'DE_Opp_ProductsGrid' and insert the code into the FieldName Case Structure of SLX Mail Merge OnCustomFieldName.

Case "DE_Opp_ProductsGrid" 'DNL
oRange.InsertAfter "Quantity|Description|List Price|Discounted Price|Total" 'DNL
oRange.InsertParagraphAfter
If strOpportunityID > "" THEN
SET opCN = NEW SLX_DB
SET opRS = opCN.GetNewRecordSet
oSQL="Select op.QUANTITY, op.LIST_PRICE, op.PRICE, op.EXTENDEDPRICE, p.NAME " & _
"From OPPORTUNITY_PRODUCT op " & _
"Inner Join PRODUCT p " & _
"On (op.PRODUCTID = p.PRODUCTID) " & _
"Where OPPORTUNITYID = '" & strOpportunityID & "' " & _
"Order By op.SORT" 'DNL
opRS.OPEN oSQL, opcn.Connection

WHILE NOT(opRS.EOF)
QTY = cSTR("" & opRS.Fields(0).VALUE)
LIST = FormatCurrency("" & opRS.Fields(1).VALUE)
PRICE = FormatCurrency("" & opRS.Fields(2).VALUE)
TOTAL = FormatCurrency("" & opRS.Fields(3).VALUE)
DESC = "" & opRS.Fields(4).VALUE
Application.Debug.WriteLine "Mail Merge Opportunity Products: " & QTY & "|" & DESC & "|" & LIST & "|" & PRICE & "|" & TOTAL
oRange.InsertAfter (QTY & "|" & DESC & "|" & LIST & "|" & PRICE & "|" & TOTAL )
oRange.InsertParagraphAfter
opRS.MoveNext
WEND

SET opRS = NOTHING
SET opCN = Nothing
'' expression.ConvertToTable(Separator, NumRows, NumColumns, InitialColumnWidth, Format,
'' ApplyBorders, ApplyShading, ApplyFont, ApplyColor, ApplyHeadingRows,
'' ApplyLastRow, ApplyFirstColumn, ApplyLastColumn, AutoFit, AutoFitBehavior, DefaultTableBehavior)
END IF
Set oTable = oRange.ConvertToTable("|", , , , wdTableFormat3DEffects1, True, True, FALSE, True, True, _
False, False, False, True, wdAutoFitContent, wdWord9TableBehavior)
[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 © 2025 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): 8/18/2025 10:57:16 AM