11/26/2024 9:26:14 AM
|
|
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.
|
|
|
|
trouble with GetViewForRecord and ShowViewForRecord
Posted: 27 Aug 06 1:41 PM
|
fiogf49gjkf0d Hi, I hava a datagrid based on accounts, with keyfield Account ID. I was able to setup double click to take me to Accounts-MainView, with the proper Account selected, But , now I wish to make a popup menu with more choices based on account selected.
I was hoping this Sub would open the Insert New Ticket Form!Application.MainViews.ShowViewForRecord "TICKET", "System:Insert New Ticket", DataGrid1.GetCurrentField("ACCOUNTID") End Sub
I was hoping this Sub would open the Ticket Mainview and Show me a list of all tickets for AccountID! Sub ShowTickets Application.MainViews.GetViewForRecord DataGrid1.GetCurrentField("ACCOUNTID"), "TICKET" End Sub
I was hoping that this sub would open Account MainView and open dataform "ProSoft Account Sales" in the TabsPane Sub SalesView Application.MainViews.ShowViewForRecord "ACCOUNT", "Personal:ProSoft Account Sales", DataGrid1.GetCurrentField("ACCOUNTID") End Sub
None of them worked. Please help |
|
|
|
Re: trouble with GetViewForRecord and ShowViewForRecord
Posted: 28 Aug 06 6:22 PM
|
fiogf49gjkf0d So, I figured out how to open a the insertticket with selected account, but its kindof long can somebody please helpe me trim out any extra code here, Like Im pretty sure the objdetails dont need to be set twice and I need to put it all one sub:
Sub Newticket Dim objMainView, objAccountDetail Set objMainView = Application.MainViews.Add("System:Insert New Ticket - Account Service Information", 0, False) 'DNL objMainView.Caption = Application.Translator.Localize("Insert New Ticket - Account Service Information") objMainView.Height = 590 objMainView.Width = 590 objMainView.BorderStyle = 3 Set objAccountDetail = objMainView.DetailsView objAccountDetail.Script.Init "Insert", DataGrid1.GetCurrentField("ACCOUNTID") 'DNL CallInsertNewTicketView True, objAccountDetail End Sub Sub CallInsertNewTicketView(blnAccntService, objAccountDetail) Dim objMainView2, objDetail
Set objMainView2 = Application.MainViews.Add("System:Insert New Ticket", 2, False) 'DNL objMainView2.Caption = Application.Translator.Localize("Insert New Ticket") objMainView2.Height = 575 objMainView2.Width = 665
Set objDetail = objMainView2.DetailsView
If objDetail.lveAccount.Enabled Then objDetail.lveAccount.LookupID = objAccountDetail.lveAccount.LookupID objDetail.lveAccount.Text = objAccountDetail.lveAccount.Text End If 'Contacts grid objDetail.lveContact.LookupID = objAccountDetail.grdContacts.GetCurrentField("CONTACTID") & "" 'DNL objDetail.lveContact.Text = objAccountDetail.grdContacts.GetCurrentField("LASTNAME") & "" 'DNL 'Contracts grid If Not objAccountDetail.chkNoContract.Checked Then objDetail.lveContract.LookupID = objAccountDetail.grdContacts.GetCurrentField("CONTRACTID") & "" 'DNL objDetail.lveContract.Text = GetContractName(objAccountDetail.grdContacts.GetCurrentField("WORKPHONE") & "") 'DNL End If
objDetail.chkSubmitSearch.Checked = SetSearchDefault() objMainView2.Show End Sub |
|
|
|
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!
|
|
|
|
|
|
|
|