Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, February 23, 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: Whats the equivalent to Application.BasicFunction.CurrentAccountID?
Sokha S.
Posts: 19
 
Whats the equivalent to Application.BasicFunction.CurrentAccountID?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 May 08 9:01 AM
Whats the equivalent to Application.BasicFunction.CurrentAccountID? I want to call this from a form that is not an AccountForm.
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Whats the equivalent to Application.BasicFunction.CurrentAccountID?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 May 08 9:12 AM
Where is the form called from? If its from opportunity for example, a possible way would be:

Sage.Entity.Interfaces.IOpportunity opp = this.BindingSource.Current as Sage.Entity.Interfaces.IOpportunity;

string currentAccId = opp.Account.Id.ToString....

[Reply][Quote]
Sokha S.
Posts: 19
 
Re: Whats the equivalent to Application.BasicFunction.CurrentAccountID?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 May 08 9:17 AM
Thanks Nick, will this work on the Insert Opportunity when the Opporunity is not bounded to the Account yet?
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Whats the equivalent to Application.BasicFunction.CurrentAccountID?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 May 08 9:21 AM
Ummm, there will be no current Account so no. You will surely be looking up the account on the insert of the opportunity, so you can just get the Id from the account lookup control surely??!
[Reply][Quote]
Sokha S.
Posts: 19
 
Re: Whats the equivalent to Application.BasicFunction.CurrentAccountID?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 May 08 9:33 AM
I was looking for a way to mimic what is being done on the Insert Opportunity Screen. When you click the Insert with the Account Detail in focus the Opp is filled in with the account info. Thanks again Nick.
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Whats the equivalent to Application.BasicFunction.CurrentAccountID?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 May 08 9:37 AM
Ok, if thats the case the code I printed previously should work. If it doesnt you could then just use the lookupid property of the account lookup. You would have to error handle in case the account lookup/Opportunity.Account entity is empty of course.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Whats the equivalent to Application.BasicFunction.CurrentAccountID?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 May 08 6:56 PM
As Nick mentioned, you can always get to the parent of the Current entity from the BindingSource or if in a SmartPart/QuickForm use GetParentEntity(). Once an account is selected it will be available to use in code, however, if you're looking for "what is the last account the user was on", then you'll have to use the Entity History Service. This can provide the info of what previously visited entities and what is the context for the system currently, such as current entity (really last) on the main view.

I've documented how to use this service here: http://customerfx.com/pages/crmdeveloper/2008/05/30/using-the-entityhistoryservice-to-retrieve-previously-accessed-entities.aspx

-Ryan
[Reply][Quote]
Sokha S.
Posts: 19
 
Re: Whats the equivalent to Application.BasicFunction.CurrentAccountID?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Jun 08 8:59 AM
Thanks Ryan!
[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): 2/23/2025 11:19:28 AM