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!
|
|
Problem with Lookups
Posted: 23 Oct 08 9:21 AM
|
Hi everyone Im trying to perform a search by Entity's ID, for example I have an Entity SICCODE, and I need to perform a search by Siccodeid, but it never return any value, what does it mean? why can not display any result... So I need to return that ID y stored in another Entity, Account.Siccodeid.
Do someone know about it? |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 9:27 AM
|
Do you have columns set in your lookup (defined in LookupProperties)? Do you have any prefilters set? Siccode does contain data when looking in SQL? (Sorry, have to ask )
Thanks, Nick |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 9:32 AM
|
Yeah i defined in properties SiccodeId,Siccode and Industry, However i haven't set any prefilters... why are those necessary?... and Siccode table contain data related to SiccodeId, because is the table's indentifier. |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 9:36 AM
|
They are not necessary, I was just checking you didnt have any set, otherwise these will filter your data.
Do you get returned rows if you search on Industry? |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 9:39 AM
|
If i add Siccodeid,Siccode and Industry, it doesn't return anything but i just add Siccode and Industry it works well... what is happening? |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 9:57 AM
|
Hmmm..sounds like you cant use a database key column in a lookup. Ive never used one before, ill do a quick check with a contact lookup... |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 10:03 AM
|
Yeah that's what i meant... please tell me what you got after you change your lookup |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 10:03 AM
|
That works fien...
Try using Id instead of SiccodeId in your lookup properties. |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 10:03 AM
|
That works fine...
Try using Id instead of SiccodeId in your lookup properties. |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 10:13 AM
|
I just have that properties Createdate, Createuser, creating, industry, instanceid, Modifydate, modifyuser, siccode and siccodeid, the Only indetifier is siccodeid...
What shold i do?
Sorry im new on Sage sales Logix Regards, Misael |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 10:19 AM
|
All Entities have an Id as a property - just call it in the lookupproperty...
No worries!
Thanks,
Nick |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 10:24 AM
|
Thank you very much!!!
I just changed Id instead of siccodeid, i just type Id and rebuild and finally it's working well!!! |
|
|
| |
|
Re: Problem with Lookups
Posted: 23 Oct 08 10:34 AM
|
Well lookup is related to Lead.Siccodeid, after i select Id from lookup, i had insert a text box in order to put a Industry field that matches with Lookup result, i got Industry in textbox, but Lookup restul is now avoid... i don't know why doesn't work Lookup if i select an Item from the grid.
Sorry for my english... Regards! Misael |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 10:49 AM
|
Ok - lost you a bit there.
Can you try to explain that again? I lose you at the grid part, wher does thr grid come into it? |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 10:52 AM
|
Ok, sorry for my last post.
When you perform a search in lookup a grid appears, and you select a value, but after i select that value any results is setting into Lookup result textbox. Regards, Misael. |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 10:54 AM
|
Ok I think I may understand after a re-read. You select something in the lookup, but the lookup is not populated? If Im correct:
i) is there an event firing on change of the lookup? ii) is the lookup bound correctly? iii) how are you trying to set the Industry?
Cheers, Nick |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 10:56 AM
|
Originally posted by Misael Ochoa M.
Ok, sorry for my last post.
When you perform a search in lookup a grid appears, and you select a value, but after i select that value any results is setting into Lookup result textbox. Regards, Misael. |
|
Right, that would suggest a problem with your binding, and binding method. What are you binding to? A relationship property? If so ensure you are using Object binding method, else use the String binding method. Make sure the binding is pointing to the correct property. |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 11:01 AM
|
Is the correct property in your lookup set as UseAsresult? I.e. the value you would expect to see in the Lookup textbox should have UseAsResult set to true... |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 11:03 AM
|
The field im binding is Lead.Siccodeid, and i related Lead.Siccodeid to Siccode.SiccodeId
when Lookup value changes it do that:
if (lueSICCode.LookupResultValue != null) { Sage.SalesLogix.Entities.SICCODE objSicCode = (Sage.SalesLogix.Entities.SICCODE)lueSICCode.LookupResultValue; Sage.Entity.Interfaces.ILead lead = (BindingSource.Current as Sage.Entity.Interfaces.ILead); lead.Industry = objSicCode.Industry; edtIndustry.Text = objSicCode.Industry; }
Also i set string expression from Siccode Entity to ${Siccodeid}
Im think it should work well. Regards, Misael. |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 11:11 AM
|
OK...
I dont think you need any of that code - you are basically doing what the lookup should do, if the lookup is correctly bound and set up.
Assuming Lead.Siccodeid is an object ( I would expect it to be called Lead.Siccode if it was an object, but this is however you named it), set the bindings on the lookup to Siccode/Id (of Lead). Make sure one of your properties is set as UseAsResult in the lookup properties. This should be Industry of Siccode I woud have thought.. And then remove your method that runs on change of the lookup. Although it should work, I dont think you need it. If I understand correctly that should give you the required result. |
|
|
|
Re: Problem with Lookups
Posted: 23 Oct 08 11:28 AM
|
Yeah the code is the problem, but how can i set in other TextField Industry matches with Siccodeid... I don't know how to do that Regards, Misael. |
|
|
|