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!
|
|
Linking from a lookup edit to an Opportunity Record
Posted: 18 Feb 08 12:38 PM
|
I am sure that this has been covered in a previous post. I have searched and couldn't find anything. I have made it so that Tickets can be bound to an Opportunity the same way that a Ticket is bound to an Account or a Contact. I am trying to make the Lookupedit link to the Opportunity that is shown in the Lookupedit. How can I go about this? I have tried the example in the Architect Help menu (below) but this only pulls up a lookup dialog box asking the user to input the Opportunity Name. Any help is greatly appreciated. Thanks.
Sub lkpOpportunityNameClick(Sender) If Sender.LookupID <> "" Then Application.BASICFunctions.SetCurrentOpportunityIDSender.LookupID End If End Sub
|
|
|
|
Re: Linking from a lookup edit to an Opportunity Record
Posted: 18 Feb 08 2:07 PM
|
Looking at the SLX Developer's Reference guide, I think I need to use the Application.BasicFunctions.ShowViewForRecord function but I am still unable to get this to work. Why oh why doesn't the developer's reference have syntax examples? I'm sure if I could find a syntax example I could figure it out. Here is some of the syntax I have tried:
Application.BasicFunctions.ShowViewForRecord "SYSTEM","Opportunity Details", strOpportunityID ....Could not find view named "Opportunity Details" Application.BasicFunctions.ShowViewForRecord "SYSTEM","System:Opportunity Details", strOpportunityID ....Could not find view named "System:Opportunity Details"
What is the correct syntax for this function?
..A call from our Sage partner has got me through this issue but I would still like to know the exact syntax of this function. Thanks. |
|
|
|
Re: Linking from a lookup edit to an Opportunity Record
Posted: 18 Feb 08 2:43 PM
|
Update: The route the Sage partner took worked for a little bit but now every single ticket in the system is an invalid record so I am going to continue with ShowViewForRecord. Anyone have any syntax examples or know where I could find one in the SLX code? |
|
|
|
Re: Linking from a lookup edit to an Opportunity Record
Posted: 18 Feb 08 4:12 PM
|
Please provide the following properties of the lue control:
Lookup LookupID LookupMainTable LookupMode Text
Is it your intention to store the associated Opportunity ID as a new field on the Ticket table?
Phil |
|
|
|
Re: Linking from a lookup edit to an Opportunity Record
Posted: 18 Feb 08 4:23 PM
|
Phil, Yes that is correct. I have created a new field on the Ticket table to store the Opportunity Id.
Lookup: OPPORTUNITY:Description LookupID: TICKET:OpportunityID LookupMainTable: OPPORTUNITY LookupMode: ImTable Text: TICKET:OPPORTUNITYNAME - With my Sage business partner I tried binding to OPPORTUNITYID and creating a local join...Something about this didn't work and every time I attemped to go to detail view I got an "Invalid Record" error message.
BTW...The text is bound TICKET:OPPORTUNITYNAME becuase I am using the GetField function to populate a hidden edit box with the Opportunity ID. |
|
|
| |
| |
|
Re: Linking from a lookup edit to an Opportunity Record
Posted: 18 Feb 08 5:18 PM
|
Hmmm, you must be damn close to getting this working!
If you look at lveContact on the Ticket Detail form, you'll see that the .text property is populated in code, not directly via a property setting - maybe you could consider taking the same approach with the Opportunity Name?
Phil |
|
|
|
Re: Linking from a lookup edit to an Opportunity Record 
Posted: 19 Feb 08 8:59 AM
|
Phil, yes I was very close. Guess I just needed the night off.
Here is how I got it to work.
Sub lkpOpportunityClick(Sender) InvokeMainView strOpportunityID, "System:" & Right(Sender.Name, Len(Sender.Name) - 3) & " Details" End Sub
Thanks for your help!
|
|
|
| |
| |
|