Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, June 25, 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: Can't find the 'insertopportunity' action
Kent Matthew
Posts: 33
 
Can't find the 'insertopportunity' actionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Sep 06 12:06 PM
fiogf49gjkf0d
I'm looking in the 'addprod' template, and I've found a reference to the action 'insertopportunity'. The only problem is that I can't find the 'insertopportunity' action anywhere in web manager...! I need to modify it so that I can write to the history table whenever the sales potential changes (i.e., whenever the user adds or deletes a product to or from an opportunity).

Does anyone know where the 'insertopportunity' action is located?

Thanks!
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: Can't find the 'insertopportunity' actionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Sep 06 5:01 PM
fiogf49gjkf0d
Kent,

It doesn't actually ever get called and it was probably meant to be removed. It looks as if the data is sent back as XML via the window.dialogArguments (see line 100 of template addprod).

There's a hidden field on the template called "oppadd" that has a hidden field called "oppproducts" that (I'm guessing) holds the data. I say this, because the action "addopportunity" has a sub called "addProducts" called from Sub Main that passes in opproducts and loads an object created using CreateObject("Msxml2.FreeThreadedDOMDocument") and loads the value from oppproducts (as a variable named prd). It looks as if it loops through the products and does it's inserts into OPPORTUNITY_PRODUCT. There's even code in there that calcualtes the SALESPOTENTIAL field for you (line 126 in the action "addopportunity"), so you can probably just take that value and insert your history record.

BTW, all my line numbers refer to a 6.2.3, don't know if it's different in 6.2.4.

Jeff



[Reply][Quote]
Kent Matthew
Posts: 33
 
Re: Can't find the 'insertopportunity' actionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Sep 06 12:53 PM
fiogf49gjkf0d
Jeff,

Wow! The 'insertopportunity' action is a true red herring! It is indeed not even called at all. Thanks for clearning up my confusion.

Actually, I need to write the old and new Sales Potential for an updated opportunity to history (instead of for a new opportunity). I was trying to accomplish this using the 'oppinfo' template and 'updateopp' action, but can't seem to save off the old value for Sales Potential. I thought that since adding products is the operation which changes the Sales Potential, I'd try to isolate the old and new Sales Potential values by digging into the 'addprod' template. It looks like this template calls the ok() function when the user clicks the "OK" button to save their modifications to the products included in the opportunity. The ok() function in turn calls the makeOppProdXML() function in oppproducts.js. My idea was to total up the extended prices for the products before and after the user makes modification to the "Selected Products" grid and pass it back through the XML, but it's not going so well.

Do you think I'm headed down the right path or is there an easier way? I'm using 6.2.4.

Thank you for the help!
- Kent
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: Can't find the 'insertopportunity' actionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Sep 06 3:24 PM
fiogf49gjkf0d
Kent,

If I'm understanding you, you're adding a product from the Products tab using the "+" icon? I'm basing my answer on that.

The oppprod template actually has two html forms (most SLX pages only have one, usually named "mainform"). There's the usual "mainform" and then there's the "addform" (search for "<form" in template oppprod). The addform is what gets submitted when you add the form, and it calls the action "oppaddprod". You'll see in there that it's updating the SALESPOTENTIAL field (search for "update opportunity" in the action oppaddprod). You should be able to select the existing value before it's updated, write your history record and then update it.

The other place you'll probably need to fix things is in the delete of a product. That isn't submitted, it's actually redirects the document to the action (in the oppprod template find the function "removeProduct"). You'll need to update the action "deleteoppprod" with the same update to write history as well.

Jeff
[Reply][Quote]
Kent Matthew
Posts: 33
 
Re: Can't find the 'insertopportunity' actionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Sep 06 12:20 PM
fiogf49gjkf0d
Once again, Jeff Ballard has saved me hours of work! Thank you very much, Jeff. This works exactly the way I need it to. Don't know why I didn't figure this out myself, but it makes perfect sense now that you've outlined it...!

Thanks for improving my week!
- Kent
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: Can't find the 'insertopportunity' actionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Sep 06 12:24 PM
fiogf49gjkf0d
Glad I could help and it worked! After 6 years of working with the slx web client, I've bent it in ways that I'd never have thought possible and it's given me a bit of understanding on how it's laid out. if I can save someone the pain I've suffered, it's the least I can do.

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): 6/25/2024 9:48:57 PM