I'm trying to use the metadata api to do a destructive change call on all non-packaged components in my sandbox.

However, I keep receiving the following error:

layouts/SocialPost-Social Post Layout.layout(SocialPost-Social Post Layout):Parent entity failed to deploy


I found it: This layout is associated with enabling Social Contacts I went ahead and disabled social contacts temporarily, but it still came down with the page-layouts in the meta-data pull!

  • I have had almost the exact same issue with the same profile. What I would probably suggest is exclude profiles from the deletion, 95% of the time I have an issue with metadata it's because of profiles – Daniel Blackhall Oct 15 '12 at 10:16
  • Did anyone answer this? I am getting same issue when trying to deploy a profile from one dev org to another dev org. Both the orgs are on Winter 13 so not sure why this would be an issue? – CoryCowgill Oct 17 '12 at 22:23
  • 1
    Ultimately I ended up just removing the layout from the sets of layouts that I download. – jordan.baucke Oct 17 '12 at 22:31

Here's what I did....

I was receiving this error when trying to do a whole bunch of changes to my internal customized code base (uninstalled an unmanaged package which was basically a way of migrating stuff from another instance, but I was tired of it being coupled to this unmanaged package).

Here's how I dealt with them, one by one:

Save error: SocialPost : Cannot create workflow directly; must create the CustomObject first SocialPost.workflow

Solution: From your workspace filesystem, delete the SocialPost.workflow file.

Save error: Parent entity failed to deploy SocialPost-Social Post Layout.layout /1pel Sandbox/src/layouts

Solution: From your workspace filesystem, delete the "SocialPost-Social Post Layout.layout" file.

Save error: In field: layout - no Layout named SocialPost-Social Post Layout found Admin.profile Solution: From the profile XML metadata file, remove this section...

    <layout>SocialPost-Social Post Layout</layout>

Which can be done using ant:

<replaceregexp flags="sg">
    <fileset dir="src/profiles" />
    <regexp pattern="&lt;layoutAssignments&gt;\s+&lt;layout&gt;SocialPost-Social Post Layout&lt;/layout&gt;\s+&lt;/layoutAssignments&gt;" />
    <substitution expression=""/>

Not sure why this is happening... too bad the Eclipse Force.com IDE isn't open source :-/

May The SForce Be With You!


Here is another interesting option that I found when searching for the same error:

Salesforce Ant Scripts Modification

Basically you update your Ant script to, using regex, strip out all the social post layouts, profile references, etc. from your codebase prior to deploying.

  • Very useful! Used the solution from that blog to remove some of the metadata which should either not be present on sandbox orgs (e.g. samlssoconfigs) or are related to a functionality not enabled on the org (e.g. Question.object and Answer.object when Salesforce Communities is not enabled). – dino ursic Jul 28 '15 at 9:50

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.