Home
|
Forums
|
Contact
|
Search
|
Syndication
[login]
[create account]
Sunday, February 23, 2025
slxdeveloper.com
Home
Search
Contact us
About slxdeveloper
Syndication
Community
Forums
(NEW!)
Newsletter Archive
Members
Your Profile
Submit Article
General
Administration
(6)
OLE DB Provider
Miscellaneous
(2)
Architect
VBScript
(9)
ActiveX Controls
(6)
How To's
(14)
.NET Extensions
(3)
External
OLE DB Provider
(12)
SLAPI (SlgxApi.dll)
SalesLogix COM
(1)
Web
ASP/ASP.NET
(2)
Web Services
Web Client
Downloads
Samples
(17)
Documentation
(7)
Utilities
(18)
Resources
SalesLogix
(3)
Programming
(1)
2/23/2025 9:57:37 AM
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 Thread
View:
Dynamic
Flat
Tree
Search:
Author
Thread: Whats the equivalent to Application.BasicFunction.CurrentAccountID?
Sokha S.
Posts: 19
Whats the equivalent to Application.BasicFunction.CurrentAccountID?
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
Re: Whats the equivalent to Application.BasicFunction.CurrentAccountID?
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?
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
Re: Whats the equivalent to Application.BasicFunction.CurrentAccountID?
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?
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
Re: Whats the equivalent to Application.BasicFunction.CurrentAccountID?
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
Re: Whats the equivalent to Application.BasicFunction.CurrentAccountID?
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?
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
|
page cache (param): 2/23/2025 10:47:38 AM