Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 2024 
 
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: Lookup Control, displaying and searching
Paula Shuler
Posts: 22
 
Lookup Control, displaying and searchingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Jan 16 5:16 PM

I am having such a hard time with this Lookup control. I have gotten so far as to figure out how to search, but that's about it.


I have a datagrid in which I am populating certain times and dates, and want to link each line to an opportunity once it's been "completed." When the window pops up, I have a lookup for the opportunity and it searches just fine via the OpportunityID, then attaches the information, and displays certain things from the Opportunity table in the datagrid (mostly the description and type).


When I click on the row again to "Edit" the information, the Opportunity box now shows the ID rather than a name (so it's something like OGCPA000012). When I am able to get it to show the Description in the box, I lose the ability to edit that field, so It seems to be a lose-lose situation no matter what I do in this case.


Additionally, I am looking to restrict the searches to opportunities within the same account, but it seems that is not working either! I am just really confused in the overall process and programming of this area, so any help or guidance will be extremely helpful!! 

[Reply][Quote]
Jin San Son
Posts: 8
 
Re: Lookup Control, displaying and searchingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Jan 16 12:45 AM

Hi Paula,


When you talking about "Edit", you are talking about Edit Form, right?


1. LookupID property should linked to the field (to save ID returned from the lookup. You lookup should return ID to ID field). You can set the "Text" property of the Lookup by JOIN and display Description field in the Opportunity table. By doing this, the control becomes Read Only since you have displayed text from another table. If the 'HideButtonIfReadOnly' checked, then you will loose the Lookup button hence you can't do the Look up on EditView. Set the HideButtonIfReadOnly off so you can keep the Lookup Button on that Lookup control when the text becomes ReadOnly.


2. For restriction,


set, "LookupRestrictField" to "ACCOUNTID", "LookupRestrictOp" to "=", set the LookupRestrictValue to the accountid that you have.


Regards,


 


Jinsan


 


 


 

[Reply][Quote]
Paula Shuler
Posts: 22
 
Re: Lookup Control, displaying and searchingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Jan 16 9:45 AM

Hi Jinsan,


You are a genius!!! I would have never thought about the lookup field becoming read only and hiding the button. That solves that problem there and makes me really happy!


I still do not understand the restriction. The thing is, where do I get the accountid? This form is on every account, so I can't type in the account id otherwise it wont work for other accounts, if that makes sense. I am just not sure how to get the from to recognize what account it is currently in to restrict the search.


Edit


I figured it out!!! For others who are interested in how:


I have a text edit that pulls out the account ID, then for the lookup field I added an OnPopup event with this code:


Sub lookupOpportunityPopup(Sender)

  Sender.LookupRestrictValue = txtAccountID.Text

End Sub


In the property fields for the Lookup I have ACCOUNTID as the LookupRestrictField and = as the LookupRestrictOp


Yay!!

[Reply][Quote]
Jin San Son
Posts: 8
 
Re: Lookup Control, displaying and searchingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Jan 16 9:02 PM

Excellent paula.


I was about to post that.


I recommend you to play aroung these properties of the Lookup. It will come handy.


1. DefaultLookup Operator


2.LookupRestrictAlways.


 


Happy coding!


 


Jinsan


 

[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 © 2024 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): 11/22/2024 10:08:02 AM