Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, August 23, 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: Triggering an event in a datagrid on edit
Marc Johnson
Posts: 252
 
Triggering an event in a datagrid on editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 May 08 2:30 PM
I'm tweaking the Products grid at the opportunity level (have to make the same change to Add Opp Product too). We have some products that have different price levels depending on their quantity. Ideally I'd like for a dialog to pop when the price level is changed for the quantity to be updated. Can I do all of this in the data grid or should I try to trigger a new pop-up form with it's own validation?

Thoughts/Suggestions?
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Triggering an event in a datagrid on editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 May 08 2:33 PM
I'd NOT allow to change the user to directly change PROGRAM or PRICE......instead pop up some kind of DataForm and allow them to choose the correct price level on the data form.....especially since you may want to stray away from the PRODUCTPROGRAM table.....and do your own thang....
[Reply][Quote]
Marc Johnson
Posts: 252
 
Re: Triggering an event in a datagrid on editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 May 08 2:39 PM
RJ, perhaps I misunderstand you, but the user won't be able to change what the price level means but choose an alternative price level for that product.

For example:
Product Name: Client License
Price Level 1: 1-4 @ $15 each
Price Level 2: 5-19 @ $12.50 each
Price Level 3: 20+ @ $10 each

At first the rep tries to sell the client 20 licenses but they decide they really only need 15. So now the sales rep has to choose Price level 2 for that client. The QTY field will still say 20, but now the business logic is invalid. I want the rep to be forced to adjust the QTY to fit the logic.
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Triggering an event in a datagrid on editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 May 08 3:52 PM
Multiple choices, other than picklists, aren't very super in inline editing. You script or pop a form to do the lookups. The rep enters QUANTITY 14, your script changes the Price Level, Price, Extended Price, etc. for him.

Simply script this. And you are correct, I don't know what you want. Your subject line is misleading, I thought you wanted information on triggerin an event in a datagrid on edit.....their is an event for this, you simply code the changes, refresh the grid, and off you go.
[Reply][Quote]
Marc Johnson
Posts: 252
 
Re: Triggering an event in a datagrid on editYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 May 08 4:00 PM
I found a solution that works for me. It's not perfect but it enforces the business logic.

In the DoGridCalculations function of the Insert Opportunity Common script, I added code(see sample below) to the PriceLevel and Quantity cases. I added another case that would look at the PriceLevel and place the quantity within the appropriate range, if the quantity didn't fit and then notified the user so they could adjust it further.

Like I said, it's not perfect but it'll certainly work.

SELECT CASE .Fields("PRICELEVEL").Value
CASE "Less than 5"
if .Fields("QUANTITY").Value > 5 then
.Fields("QUANTITY").Value = 4
msgbox "The quantity for this item has been changed to " & .Fields("QUANTITY").Value & " to fit within the " & .Fields("PRICELEVEL").Value & " price level."
end if
[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/23/2025 5:47:13 PM