Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, June 19, 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: Passing custom data when converting from a Lead to an Opportunity
Mark Mazzitello
Posts: 14
 
Passing custom data when converting from a Lead to an Opportunity Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jun 07 5:08 PM
I am using a couple of the "Userfields" in the Leads table to capture some pieces of information, and would like the data in these columns to be migrated to the opportunity when the lead is converted from a lead to an actual opportunity (just like the default data is). Sounds simple enough, doesn't it?

To make a long story short, what I have found is that in the process of converting a lead to an opportunity, the "Insert Opportunity" form with all of the default lead data filled in is called by a "Function" in SalesLogix called "InsertOpportunity" which is the same way the Insert Opportunity form is opened when the user clicks the menu or button to insert an opportunity (without starting from a lead). Now as we all know, "Functions" are not editable or even able to be looked at to see what they are doing, so adding a few custom fields to a function cannot be done.
What I therefore need to do each time the Insert Opportunity form is opened is to determine whether it was initiated by a user clicking a menu or if it was initiated by converting a lead, then if it was initiated by a lead conversion I need to know which lead it was so I can grab the custom field data from that lead and fill it in the Insert Opportunity form. Again this sounds simple enough in itself, but since that "Function:Insert Opportunity" is always what opens the Insert Opportunity form how can I find out what event called the function which is calling the form?

Maybe I'm making this too complicated, or maybe what I am trying to do could be done using global variables that are set in the Lead Detail form when the "Convert" button is clicked and then somehow accessed by the Insert Opportunity form and then immediately cleared so the next opportunity to be created doesn't try to re-use the values?

If anyone has any ideas or can steer me in the direction of how to pass custom data fields from a Lead to an Opportunity during the "Convert" process, any help or suggestions would be appreciated.

Thanks!

[Reply][Quote]
John Gundrum
Posts: 632
Top 10 forum poster: 632 posts
 
Re: Passing custom data when converting from a Lead to an Opportunity Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Jun 07 7:00 AM
Mark,

Maybe instead of trying to do all of the work after the system calls Insert Opportunity, why not split up the work. That is, right after a user confirms they want to convert a lead to an opportunity create a variable that contains the leadid. Then after InsertOpportunity does its thing you can check that variable for a value. This would be your link. If the variable exists and has a value you know you have to pull the custom data.

John G.
[Reply][Quote]
Mark Mazzitello
Posts: 14
 
Re: Passing custom data when converting from a Lead to an Opportunity Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Jun 07 4:05 PM
Thanks John, I think I will give this approach a try. My main concern is making absolutely sure that global variable is cleared as soon as it is done pulling the custom data so the next opportunity to be created doesn't pull the same data again from that lead, but that shouldn't be too difficult to do.

Thanks for the suggestion, if I get this working I'll post what I did to the forum.

Mark
[Reply][Quote]
John Gundrum
Posts: 632
Top 10 forum poster: 632 posts
 
Re: Passing custom data when converting from a Lead to an Opportunity Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Jun 07 8:25 AM
Clearing the variable will be done from your custom code after you've updated the opportunity with the custom field data. You could also reset it in the beginning of the Insert Opportunity code as well.

Good luck,
John G.
[Reply][Quote]
Mark Mazzitello
Posts: 14
 
Re: Passing custom data when converting from a Lead to an Opportunity Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Jun 07 9:06 AM
Hi John.

That's pretty much exactly what I did, I set global variables with my custom data in the on click event for the "Convert Lead" button, and then deleted the variables on the form destroy event of the "Convert Lead" form. All I had to do was have the "Insert Opportunity" form check to see if these global varibles exist each time it opens and grab the data if there is any. Works perfect.

Thanks for the idea.

Mark
[Reply][Quote]
John Gundrum
Posts: 632
Top 10 forum poster: 632 posts
 
Re: Passing custom data when converting from a Lead to an Opportunity Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Jun 07 9:08 AM
Excellent! Glad to hear it's all working!

John G.
[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): 6/19/2025 2:17:52 AM