7/1/2025 2:31:35 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!
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.
|
|
|
|
Customer Portal - Where to put code
Posted: 15 Jan 10 11:03 AM
|
I need to provide customers with the capability to change their password. There are several references in this forum to providing this capability but I am struggling with connecting the pieces.
here is what I have.
SLX 7.5.2
1. Created quickforms under Contact. PortalContact and NewPortalPassword. 2. Add MyAccount page under Customer Portal portal. 3. Added PortalContact as MainContent smartpart and NewPortalPassword as tab smartpart. 4. Added Navigation to go to MyAccount.aspx
When I click on MyAccount on the navbar I get a blank PortalContact page. If I change the url to MyAccount.aspx?entityid=CIJR2A0001N4, I get the record I need and can update the information.
I found this code Ryan posted which will give me the contactid I need.
using Sage.SalesLogix.Security; // for SLXUserService using Sage.Platform.Security; // for IUserService using Sage.Platform.Application; //for ApplicationContext using Sage.SalesLogix.Web; // for WebPortalUserService using Sage.Entity.Interfaces; //for IContact //...
SLXUserService service = ApplicationContext.Current.Services.Get(true) as SLXUserService; if (service is WebPortalUserService) { WebPortalUserService portalservice = (WebPortalUserService)service; IContact contact = portalservice.GetPortalUser().Contact; // now do what is needed with the contact string sconid = contact.Id; }
So for a newbie to coding in AA, where does this code go. Does it go on the nav bar button or does it go in the OnCreate event of the page? Not sure where and how to do it.
Thanks in advance. |
|
|
|
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!
|
|
|
|
|
|
|
|