8/23/2025 10:31:03 PM
|
|
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!
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.
|
|
|
|
Calling a Tab from a Detail View
Posted: 06 Jun 08 3:54 AM
|
Hi All,
Can't see how this can be done, so any help would be greatly appreciated!
Scenario.
In the “Account Detail View”, I have a button, when I press that I want to set the active tab to “Contacts” and I want to pass a variable to the Contacts tab and run a sub.
Any ideas or pointers?
Many Thanks Duncan
|
|
|
|
Re: Calling a Tab from a Detail View
Posted: 07 Jun 08 4:33 AM
|
Duncan, you can use the Application.basicfunctions.SetTabVisibleProperty "Contact", True
Not sure by what you mean by the 2nd part but you can do this on a new view as you've probably seen :
Dim objMainView, objDetail
Set objMainView = Application.MainViews.Add("family:view", 0, False) 'DNL Set objDetail = objMainView.DetailsView objDetail.Script.Init - you're stuff If objMainView.ShowModal = mrOK Then End If
Set objDetail = Nothing Set objMainView = Nothing
But this requires the view to be invoked.
You might be able to rattle through the active forms (that are loaded, as this one will now be) and run the script that way?
For i = 0 To Application.Forms.Count - 1 If Application.Forms.Item(i).Name = "YourForm" Then Application.Forms.Item(i).Script.Init - your stuff Exit For End If Next
Although, I've never tried it ! Mike
|
|
|
|
Re: Calling a Tab from a Detail View
Posted: 09 Jun 08 4:42 AM
|
Thanks Mike, it’s been a while since I've done any Thick Client Work, I'll give this a go and let you know how I get on.
|
|
|
|
Re: Calling a Tab from a Detail View
Posted: 09 Jun 08 9:55 AM
|
Thanks Mike, in the end I did the following;
On the detail view I added the following code on button click ------ Application.basicfunctions.SetTabVisibleProperty "Account:E1-Account-Contacts", False Application.basicfunctions.SetTabVisibleProperty "Account:E1-Account-Contacts", True ------ I set it to false first in case it is already opens, this ensures the Open action fires on the tab view
Then in the tab view I add the following to the on Open action ------ Dim detView Dim mailType Set detView = Application.MainViews.ActiveView.DetailsView mailType = detView.lblCurrentAddress.Caption ------
Thanks for your help
DC |
|
|
|
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!
|
|
|
|
|
|
|
|