+ Start a Discussion
Norm22Norm22 

FeedItem for Managed Package

My managed package includes a custom object that requires FeedItem to be turned on for Chatter to work properly.

How do I pass along this setting when I create packages?

Best Answer chosen by Admin (Salesforce Developers) 
DarrellDDarrellD

My understanding is that the field would automatically be packaged but you will have to set the tracking on the item yourself.  So you'd either have to have the client do it, you do it by logging in, or you add it to the PostInstallScript.  But if you do it using a PostInstallScript you would still need to add the field in that case since the app is already installed.

 

I haven't done the Chatter packaging myself, just field history, but field history works the same.  We have to add the Field History tracking to the object first before installing the package to get it to work way we want.

 

In the cases where you are modifying a clients existing object, such as you appear to be doing, they are intentionally making it a little difficult to ensure that we don't add unwanted changes to the client's environment.  So if they didn't have feed tracking on an existing item, they don't want us to easily add it with the app and create unwanted changes to their environment.  If you were adding a Custom Object yourself, then it can all be packaged at same time.

All Answers

DarrellDDarrellD

If installing into a current SalesForce customer, they first have to have Chatter enabled.  For the feed tracking, for Chatter see below.  For history tracking for other items so long as you include the tracking on the field it's automatically packaged.

 

From the ISV Guide:

"Chatter feed tracking and history tracking are automatically packaged when a field is packaged."

 

ISV Guide has a lot of good stuff regarding packaging.

Norm22Norm22

Darrel,

 

Thanks for the quick reply.

 

The org where the package is getting installed already has chatter enabled, yet feeditem does not get enabled for the custom object. 

 

 

DarrellDDarrellD

My understanding is that the field would automatically be packaged but you will have to set the tracking on the item yourself.  So you'd either have to have the client do it, you do it by logging in, or you add it to the PostInstallScript.  But if you do it using a PostInstallScript you would still need to add the field in that case since the app is already installed.

 

I haven't done the Chatter packaging myself, just field history, but field history works the same.  We have to add the Field History tracking to the object first before installing the package to get it to work way we want.

 

In the cases where you are modifying a clients existing object, such as you appear to be doing, they are intentionally making it a little difficult to ensure that we don't add unwanted changes to the client's environment.  So if they didn't have feed tracking on an existing item, they don't want us to easily add it with the app and create unwanted changes to their environment.  If you were adding a Custom Object yourself, then it can all be packaged at same time.

This was selected as the best answer
Norm22Norm22

You are correct. If the user is installing a new upgrade package over their existing, and this upgrade includes FeedItem turned on, it will not get updated.

 

FeedItem will only get passed along if the object is being installled at the same time.

 

This is very annoying, especially if you are introducing new features, such as Chatter, to existing custom objects.