So I am trying to design an license tracking type tool in SF. I need to have a license custom object and then a list of users or contacts who the license applies to. There would be a set number of seats so I need to be able to track seats available and seats used.

My first thought with this was to add a checkbox field on contact like 'Licensed User'. But I need to be able to roll up sum those from the license object. I can't seem to do that. How would I go about getting the seats used and seats available would I have to create my own custom licensed user object for each user then add that as a detail in master-detail relationship on the license object? Is that the only way? I guess I really wanted to utilize the existing contact object.

Any thoughts on this approach or a totally different idea would be welcome.


Database design practices would suggest making a many-to-many relationship between Contact, a junction object, and the License custom object. If master-detail relationships aren't available, you should use a lookup relationship and then write a trigger on the appropriate objects. I would be very careful, as you will likely need a trigger on all three objects and you don't want to get into a big recursion loop.

Though you didn't mention it, I'm assuming that each Account would have a field for "total purchased licenses" so you could track that? But if you sold multiple license types, then you would need another object for the license type and would need to keep counts for each type and link that junction object to the license type object as well.

Oh, and a checkbox is rarely a good idea, but has merit here - as a reporting aid. In this case, I'd make a formula checkbox that looked at the total licenses a contact has, and would be checked if that number were greater than zero.

Without a lot more information, I'm not sure how much more I can help, but I hope I've given you something to think about.

  • Thanks David yeah I thought I might have to go with a join object in fact I had already created a subscription contacts join but couldn't do the rollup summary on it. I will try changing it to lookup and seeing if I can do the calculations in a trigger. – AdamB Apr 8 '14 at 0:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.