Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, February 22, 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: Opening account details view directly from Lead deatils view
Dave Cleary
Posts: 61
 
Opening account details view directly from Lead deatils viewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Jan 14 6:13 AM

Hi


Can I open the account details view from a lead?


I have previously created a lead from an account that already exists on the system and have the accountid stored in the lead table.


Is there any way of me running an event that will take the accountid and open up the account details form directly, something similar to when an account is created from a lead and it takes you directly to the contact details view.


Can this be done?


I thought that doing something like below


    Set objMainView = Application.MainViews.Add("Account:Account Detail", 0, False)
    If objMainView.ShowModal = mrOk Then
    End If
    Set objMainView = Nothing


but I can't get it to open up in the way a converted lead takes you to the Contact table.


Can anybody help?


Thanks


Dave


 

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Opening account details view directly from Lead deatils viewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Jan 14 6:33 AM

You don't need any code at all (not really). Just include the SLX_Common script into your code and use:


 


 


<p>OpenMainViewFromGridCrntID grdContacts, "CONTACTID", "System:Contact Details", 1, True 'DNL

 


 


For example. This will take whatever item is highlighted on grdContacts - then open the contact details main view and set it to this contact (opening it, if it's not already open). Or, if this isn't a grid, you can do the same:



      Dim objMainView<br />      Set objMainView = Application.MainViews.AddEx("System:Opportunity - Quote Details", 1, True, 1, dgQuotes.GetCurrentField("A2_OPPORTUNITYID"), "") 'DNL


 


So, this simply takes the view and the ID and moves to the view (again, opening it if required). Beware also - this is the MAIN VIEW NAME (Contact DetailS) - not the form Contact Detail. It needs to be the main view name and the MV itself will have a reference to the view to display (plus tabs etc).


 


 


 

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Opening account details view directly from Lead deatils viewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Jan 14 7:22 AM

Mike, your code wasn't for Account Details but I knew what you were doing....


 


I often use on a button or click of a control


DIM AID


AID = whatever the AccountID value control is databound to.Text or .LookupID


Application.BasicFunctions.SetCurrentAccountID AID


 


Which actually jumps you to the Main Account View....


 


 

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Opening account details view directly from Lead deatils viewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Jan 14 7:24 AM

Well, I don't to make it too easy do I And yes, the SetCurrentXXX will work - provided it's the A/C/O entities only of course.

[Reply][Quote]
Dave Cleary
Posts: 61
 
Re: Opening account details view directly from Lead deatils viewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Jan 14 8:50 AM

Thanks for both the replies, they both work great but i've opted for RJ's slightly quicker option as I have the accountid easily to hand.


Thanks again.


 

[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): 2/22/2025 8:33:13 AM