Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, August 29, 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: thanks for previous advice - still can't get it to work
James Friendship
Posts: 4
 
thanks for previous advice - still can't get it to workYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 May 09 11:13 AM
We wanted to change cost price as a default in the opp.products grid and a bright spark said
we shoudl create our own grid brilliant idea and so i tried.
the grid appears but no data. I know i am not alone with this problem.
code below

option explicit

'This is needed because the WhenOpen event for a form does not fire
'when the form is used as a tab on the Opportunity Detail view.
'Do not remove.
Sub txtDataBoundChange(Sender)
Dim strSQL

strSQL ="SELECT OPPORTUNITY_PRODUCT.PRODUCTID as A2_PRODUCT_ID, PRODUCT.DESCRIPTION AS A3_DESCRIPTION, PRODUCT.FAMILY AS A3_FAMILY, PRODUCT.FIXEDCOST AS A3_FIXEDCOST," _
& "OPPORTUNITY_AVC.QTY_TO_ORDER AS A4_QTY_TO_ORDER" _
& "FROM OPPORTUNITY INNER JOIN" _
& "OPPORTUNITY_PRODUCT ON OPPORTUNITY.OPPORTUNITYID = OPPORTUNITY_PRODUCT.OPPORTUNITYID INNER JOIN" _
& "PRODUCT ON OPPORTUNITY_PRODUCT.PRODUCTID = PRODUCT.PRODUCTID INNER JOIN" _
& "OPPORTUNITY_AVC ON OPPORTUNITY.OPPORTUNITYID = OPPORTUNITY_AVC.OPPORTUNITYID WHERE opportunity.OPPORTUNITYID = OPPORTUNITY_PRODUCT.OPPORTUNITYID"

po.SQL = strSQL
po.Refresh


End Sub


i apologise in advance for wasting anyones time with what is probably an obvious issue

many thanks in advise

grid display beautifully in enterprise manger
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: thanks for previous advice - still can't get it to workYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 May 09 12:19 PM
First of all, the reason why the events are not firing is more than likely because there are no bound controls on the Form, so you may be able to either drop a hidden text field bound to any opportunity field, or bind the Grid to the OpportunityID (Suggested method, read below why).

Second, the SQL Statement is not filtering out for any specific opportunity, you should add a condition to filter only for the Current Opportuntiy: OPPORTUNITY.OPPORTUNITYID = 'XXXXX'. If your grid is bound, you could use OPPORTUNITY.OPPORTUNITYID = :bindid

Third, and this may depend on the version of SLX you are working on, use the following property: po.SQL.Text = strSQL

Fourth, have you added Columns to the Grid and bound them to the field names you defined on your statement? You could do so by defining the Grid SQL, laying out the Columns and then matching your statements to it.

Fifth, run the SLXProfiler to see if SLX is able to parse that statement.

And finally, yes the Product Grids under Opportunity is somewhat complex, but it can be modified. You just need a bit of patience to review all components involved and how your changes affect them.
[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: thanks for previous advice - still can't get it to workYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 May 09 3:24 AM
There are a whole bunch of forms that need to be modified (you've found one!) - look below for the rest.

==========================================
"Simply" adding a new field to OppProduct:
==========================================

Form: Opportunity:Products
--------------------------
Sub PopulateDataGrid : modify to include col in sql, and the grdProducts
Sub CommitChanges : Modify to include col in sql, and the update rs

Form: System:Insert Opportunity
------------------------------
Sub SaveOpportunityProductInfo( )

Script: System:Insert Opportunity Common
----------------------------------------
Sub DefineProductsGrid(oppID) : modify to include new section detailing new column
Function CreateProductsRSStructure : modify to include new column
Function DoGridCalculations(Sender, FieldName, Value, OppID)
: Modify to include within loop/case the new field
If strCrntRecord = .Fields("KEYFIELDID").Value Then
.Fields("yourfieldhere").Value = Value
End If
Sub SaveOpportunityProductInfo( )
Sub RemoveProducts( )


Form: System:Add Opportunity Product
------------------------------------
Sub AddProductToGrid(objRS, intQty) : Modify to include any defaults
Sub UpdateCurrentProduct( )
Sub AddDeleteProductToDB( )

[Reply][Quote]
James Friendship
Posts: 4
 
Re: thanks for previous advice - still can't get it to workYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 May 09 3:47 AM
thanks very much for taking the time out to reply i will have a go at this and report back wich me luck!
[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/29/2025 8:17:58 AM