Friday, March 2, 2012

Tracking Portal Access, and Licenses

I recently wrote about how difficult it was to track how many licenses you have left, and that I was going to be working on a way to track those.

I also have another issue, that may or may not be relevant to each of you, but is a very big deal for my company.

Our portal users are billed for access to our data base on a monthly basis, based on the specific projects to which they have access.

I added a custom object, that has a master/detail relationship with the custom object "Project", and look ups to the user, the contact and the account, as well as specific fields such as "Activation Date", "Type of Access" and so forth, so that we can see when they were given access to that project, what site from which they view it, and if they are ever deactivated for that project, we can see what date that happened as well.

Now, I never had a reason to try this before, so it was a complete surprise to me that if you put a look up to the user object on a custom object, you're not going to be able to look up to a portal user. What I mean by that, is as of right now (this is still pending confirmation via #askforce on Twitter...) it appears that the look up field automatically excludes client portal users!

So I am currently searching for a way to do this via the API, with a trigger or something. I had SUCH a great idea... which was thwarted with this little conundrum.

Such a sad thing to happen on my birthday, or well... the day before my birthday.

;-)