• Alexander Vallat
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
Has anyone else experienced problems with detecting schema changes to ContentVersion specifically?

According to https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/describe_global_with_ifmodified_header.htm the Last-Modified and If-Modified-Since headers can be used to determine if metadata has changed.

This works fine when adding or removing a field from standard or custom object types, however it does *not* work when adding or removing a field from ContentVersion.

Repro steps:
1. Call /services/data/v49.0/sobjects, note the Last-Modified header value.
2. In the Object Manager, add or remove a custom field from a standard (e.g. Account) or custom record type
3. Call /services/data/v49.0/sobjects, note the Last-Modified header value has been updated
4. Add or remove a custom field from ContentVersion record type
5. Call /services/data/v49.0/sobjects, note the Last-Modified header value has *NOT* been updated
6. Call /services/data/v49.0/sobjects, with an If-Modified-Since header value that is prior to the modification to ContentVersion. Note that a 304 Not Modified response is returned.
I have checked the Metadata Coverage (https://developer.salesforce.com/docs/metadata-coverage/46) page, and it confirms that Profile (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_profile.htm) can be included in a 2GP (sfdx) managed package.

I have successfully created the new named profile in a scratch org, and used source:pull to retrieve it into the force-app\main\default\profiles\myprofilename.profile-meta.xml

However, when I create a managed package from it, and install it into an org, I do not see the Profile listed anywhere in the list of package components, nor do I see the profile available in the profiles list after installation.

Is there something I'm missing here? The other components (Apex classes, VisualForce pages, Custom Object types) are all included correctly in the package.
I have checked the Metadata Coverage (https://developer.salesforce.com/docs/metadata-coverage/46) page, and it confirms that Profile (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_profile.htm) can be included in a 2GP (sfdx) managed package.

I have successfully created the new named profile in a scratch org, and used source:pull to retrieve it into the force-app\main\default\profiles\myprofilename.profile-meta.xml

However, when I create a managed package from it, and install it into an org, I do not see the Profile listed anywhere in the list of package components, nor do I see the profile available in the profiles list after installation.

Is there something I'm missing here? The other components (Apex classes, VisualForce pages, Custom Object types) are all included correctly in the package.
Has anyone else experienced problems with detecting schema changes to ContentVersion specifically?

According to https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/describe_global_with_ifmodified_header.htm the Last-Modified and If-Modified-Since headers can be used to determine if metadata has changed.

This works fine when adding or removing a field from standard or custom object types, however it does *not* work when adding or removing a field from ContentVersion.

Repro steps:
1. Call /services/data/v49.0/sobjects, note the Last-Modified header value.
2. In the Object Manager, add or remove a custom field from a standard (e.g. Account) or custom record type
3. Call /services/data/v49.0/sobjects, note the Last-Modified header value has been updated
4. Add or remove a custom field from ContentVersion record type
5. Call /services/data/v49.0/sobjects, note the Last-Modified header value has *NOT* been updated
6. Call /services/data/v49.0/sobjects, with an If-Modified-Since header value that is prior to the modification to ContentVersion. Note that a 304 Not Modified response is returned.
I have checked the Metadata Coverage (https://developer.salesforce.com/docs/metadata-coverage/46) page, and it confirms that Profile (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_profile.htm) can be included in a 2GP (sfdx) managed package.

I have successfully created the new named profile in a scratch org, and used source:pull to retrieve it into the force-app\main\default\profiles\myprofilename.profile-meta.xml

However, when I create a managed package from it, and install it into an org, I do not see the Profile listed anywhere in the list of package components, nor do I see the profile available in the profiles list after installation.

Is there something I'm missing here? The other components (Apex classes, VisualForce pages, Custom Object types) are all included correctly in the package.