This is kind of an SOS
I would normally spend a few days on a project before asking for help, but I’ve been given a fire to put out which has a significant impact on the customer.
On the customer portal, users are able to enter support cases. I need to limit the support cases that show up in the grid to just cases created by the contact that is logged in. Right now, all cases are being displayed for any user. The users are simply contacts for a BAccount “PORTALUSER”. So, when that contact logs in, they see everything for that baccount.
My thought is to somehow change the view on the grid so that it adds a where condition
CRCase.contactID = AccessInfo.contactID.FromCurrent()
It looks like I need to modify the FilteredItems view.
Can I override this?
Or, is there some way I can override one of the screen events to restrict the Case view?
I’m also trying to find out how I can get the contactID of the current user.
I can get the userID with this code:
Guid? currentUser = CommonServiceLocator.ServiceLocator.Current.GetInstance<ICurrentUserInformationProvider>().GetUserId();
I cannot seem to find how to get the contactID for that user. I can see that AccessInfo.contactID is a property of AccessInfo, but I don’t know how to get a reference to the “current” of that.