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 Question
William Vespe
Posts: 16
 
Lookup QuestionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Sep 08 11:40 AM
Hello all;

I have a form that is based on the Ticket entity. On that form, I have a lookup based on the AccountProduct entity. Next to the lookup, I have a button that allows the user to add the AccoutProduct from the lookup to the TicketAccountProduct entity. However, I seem to be struggling with how to use AccountProduct selected in the lookup in my code. Here is my snippet:

Sage.Entity.Interfaces.ITicket myTicket = this.BindingSource.Current as Sage.Entity.Interfaces.ITicket;
Sage.Entity.Interfaces.ITicketAccountProduct myTicketAccountProduct = Sage.Platform.EntityFactory.Create();
myTicketAccountProduct.Ticket = myTicket;
myTicketAccountProduct.AccountProduct = lueAccountProduct.LookupResultValue;
myTicketAccountProduct.Save();

The problem is with this line:
myTicketAccountProduct.AccountProduct = lueAccountProduct.LookupResultValue;

The build fails because LookupResultValue is an 'object' while myTicketAccountProduct.AccountProduct is type 'ITicketAccountProduct'

I am sure I am just going about accesing the returned data from the lookup incorrectly, but can't find an example to copy.

Thanks for the help!

William
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Lookup QuestionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Sep 08 11:21 PM
Change this line:

myTicketAccountProduct.AccountProduct = lueAccountProduct.LookupResultValue;


to this:

myTicketAccountProduct.AccountProduct = lueAccountProduct.LookupResultValue as Sage.Entity.Interfaces.IAccountProduct;


-Ryan
[Reply][Quote]
William Vespe
Posts: 16
 
Re: Lookup QuestionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Oct 08 1:29 PM
Thanks Ryan - that did the trick.
[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:39 PM