Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

So I have a content library workspace setup in my org, and I was wondering if it would be possible to have a trigger set up such that when a file is uploaded, it blasts an email to a specified list of users in my org.

Anyone have any idea where I should start researching this, or has anyone done something similar?

Thanks!

share|improve this question
    
FYI think I might have found the database, it is called "Content"... I don't know if this is a custom table in my org, or if this is salesforce's doing. I will continue to update my progress. –  gfppaste Feb 14 '13 at 16:24
add comment

2 Answers 2

up vote 3 down vote accepted

The prior answer is correct, a workflow or trigger would be the usual way to do this. Unfortunately Content does not support workflow yet, but did recently add support for triggers on a couple of the content objects.

The Content data model is a little funky at first. It'll help to review the Content ERD in the Webservices API Docs.

If you're only looking for just brand new documents, look at creating a trigger on the ContentDocument object. If you're looking to handle uploads of updates to existing documents you can put a trigger on the ContentVersion object.

Before you go down that road you really should check out the standard subscription features of content. They support getting notifications when new content is added to a library or content pack. Would save you from having to do custom development and keep the user's themselves in control of their notifications.

share|improve this answer
add comment

Triggers can be activated when based on a database object's status: before insert, after insert, before update, after update, before delete and after delete. Provided your uploaded files are going to be added to your database, they can be used to activate a trigger.

So the question becomes, how do you manage your uploaded files? Do you have workflow rules you use to manage them before they're accepted into your database? If so, then I'd recommend you add a workflow rule to initiate the desired emails rather than coding a trigger. That would likely be the simplest solution for you since the files presumably need to be added to your database via some method.

share|improve this answer
    
I've been looking into that, but I can't figure out how content interacts with the database... any insight into this? I basically want to find which table is being edited when content is uploaded, but don't know if it's public facing, because I sure as shootin' can't find anything haha. –  gfppaste Feb 14 '13 at 15:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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