Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, August 13, 2025 
 
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!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Lookup returns an ID rather than a Name - What am I doing wrong?
Alec Denholm
Posts: 23
 
Lookup returns an ID rather than a Name - What am I doing wrong?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Sep 08 9:42 AM
This one's driving me insane!

Here's the setup:

I've made a lookup control on the Opportunity Details smartpart in 7.5 (that is, the main detail of the Opportunity 'main view'). I've set it up to point to a custom table called Service, represented by the Service entity. There is a Child property within the Opportunity entity, called Service. The exact relationship details are as such:

"The Opportunity entity has a realtionship to the Service entity."
"This relationship will be included in the Opportunity entity, represented by the Opportunity.Service property."
"The Opportunity.Service property can be null."
"The related entity, Service, whislt related to the Opportunity entity, does not have a related property."
"The relationship is represented by joining Opportunity.ServiceID to Service.ServiceID."

The Service entity does not have any child or parent properties.

The problem:

In the client, my lookup correctly displays, allows me to search my Services by name, and select the one I want - BUT, the field then shows an ID rather than the Service Name. As far as I can see, I've set everything up in almost exactly the same way that Opportunity Reseller has been set up. There must be some difference I'm missing because I really can't see it!
The relationship of Opportunity's child property of Reseller is word-for-word the same as my child property of Service (though obviously joining on the appropriate Id).

Why might my lookup be displaying an ID on return, rather than the name which correctly displayed in the lookup window? Thanks guys!

Just in case this is relevant: slx 7.5.0.1484, windows servers 2k3, sql 2k5
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Lookup returns an ID rather than a Name - What am I doing wrong?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Sep 08 10:22 AM
The problem is that you've not defined a string expression for the entity you're looking up (or that it is already set to the Id property). Open the entity in AA and go to the last tab called "SalesLogix Extended". You'll find there the string expression. Change that to the property (or properties) you want in the following format:

${PropertyName}

or

${Property1} ${Property2}

or

Service #: ${ServiceNumber}

etc. The property name is case sensitive. This is the .NET ".ToString()" for the entity. It is what will display for that entity in lookups, grids, etc. Keep in mind that this effects how it will display for all lookups in the system.
[Reply][Quote]
Alec Denholm
Posts: 23
 
Re: Lookup returns an ID rather than a Name - What am I doing wrong?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Sep 08 11:18 AM
Thanks Ryan, I'd forgotten to set the string expression as I'd created the entity on an existing table so my mental 'how to make a new entity' routine was thrown off.

Unfortunately though, this hasn't fixed it. It doesn't appear to have made any difference at all, actually, so I'm a bit suspicious that there's something else more fundamentally wrong with this entity. Might just start from scratch tomorrow, it would have taken less time and effort!

Thanks again for your response, it surely is the logical fix for the problem.
[Reply][Quote]
Stephen Redmond
Posts: 190
 
Re: Lookup returns an ID rather than a Name - What am I doing wrong?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Sep 08 12:39 PM
Alec,

Are you definitely on "GOLD" release? I saw this problem on RC2 but it appears to have gone away for me on release.

The "giveaway" for the not setting the name is that it displays the class instead (e.g. "Sage...IService") - which is different to the problem that you are mentioning.


Stephen
www.slxmaster.com
[Reply][Quote]
Alec Denholm
Posts: 23
 
Re: Lookup returns an ID rather than a Name - What am I doing wrong?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Oct 08 8:56 AM
Hi again guys,

I've sorted my problem out though I'm not sure I'd call it a victory as such. This morning I deleted the problem entity and all references to it, then rebuilt it, this time as a 'new entity and table' rather than '... from existing table', and predictably enough, it worked first time, exactly as it should have done.

I don't know if this means there was something wrong with the table I was trying to base the entity from to begin with. As far as I can see it's just a table with an slx id field, the 4 create/modify fields, and 1 other, a String 80 field called ServiceName. It being 80 characters long was a bit odd, I don't know if this is relevant however; the replacement I made this morning I left at the default 64 characters, and named it Description.

Anyway, as I've said, I have managed to achieve the result I was looking for. My thanks goes to the two of you who gave helpful responses to my query.
[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 © 2025 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): 8/13/2025 3:08:45 PM