• JohnnyV!
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
I've been looking at the destructivechanges.xml file section of the Force Migration Tool and was wondering if anyone has been able to remove list views (views within Leads, Accounts, etc) but not removing the core object (Lead, Account, etc).

In our example, we want to clean up some of the default views within the Leads and Accounts tabs.   What I cannot figure out is how to specify only those items, since the package.xml doesn't really go deeper than listing the Lead and Account object (as shown below):

    <types>
        <members>Account</members>
        <members>Lead</members>
        <name>CustomObject</name>
    </types>

I would guess that putting the information in the destructivechanges.xml would remove the Account and Lead objects ... or at least attempt to. :) Instead, I would prefer to remove <listViews> items from the Account.object and Lead.object files.  Example below:

    <listViews>
        <fullName>AccountsInMyMarket</fullName>
        <booleanFilter>1</booleanFilter>
        <columns>ACCOUNT.NAME</columns>
        <columns>ACCOUNT.ADDRESS1_STATE</columns>
        <columns>ACCOUNT.PHONE1</columns>
        <columns>ACCOUNT.TYPE</columns>
        <columns>CORE.USERS.ALIAS</columns>
        <filterScope>Everything</filterScope>
        <filters>
            <field>Is_My_Market__c</field>
            <operation>equals</operation>
            <value>1</value>
        </filters>
        <label>Accounts In My Market</label>
    </listViews>

I would like to remove the Accounts In My Market item as shown above.

Any idea how to do that using the Force Migration Tool and destructivechanges.xml?

Thanks so much for your time!
jv
 
I have been working with the Force Migration Tool and am experiencing issues with trying to do a full refresh from one sandbox to another.  The following errors are appearing when I try to call sf:deploy:

1.  layouts/FeedItem-Feed Item Layout.layout -- Error: Layout must have at least 1 section

2.  layouts/SocialPost-Social Post Layout.layout -- Error: Parent entity failed to deploy

3.  layouts/UserAlt-User Profile Layout.layout -- Error: Cannot use field:Name in a layout

4.  workflows/Question.workflow -- Error: Cannot create workflow directly; must create the CustomObject first

5.  workflows/Reply.workflow -- Error: Cannot create workflow directly; must create the CustomObject first

6.  workflows/SocialPost.workflow -- Error: Cannot create workflow directly; must create the CustomObject first

My approach has been to use sf:retrieve to get the metadata from the src\ folder and place it into a localCopy folder.  (The src\ files are the files checked into Git from the source Sandbox.)  Next, I have been using sf:deploy to use the files in the localCopy folder to refresh the target Sandbox.  When I run the sf:retrieve task, I am getting the six errors listed above.

I should point out that the items noted in the six errors (above) are not elements that we have made changes to.  My goal is to make the sf:retrieve and sf:deploy processes more generic, to simply push everything (that I can) from the source to the target Sandboxes.  Hopefully this is an obtainable goal.  :)

I can remove these six elements manually, but then I start getting errors with the referenes in the profiles.  If I leave out the profiles too, then my code deploys, but none of the permissions are getting set ... to things like Custom Fields in the Lead object (for example).  Ugh!

I am very new to Salesforce and to the Force Migration Tool ... so any help that can be provided would be very much appreciated.

Thank you for your time!
jv
I have been working with the Force Migration Tool and am experiencing issues with trying to do a full refresh from one sandbox to another.  The following errors are appearing when I try to call sf:deploy:

1.  layouts/FeedItem-Feed Item Layout.layout -- Error: Layout must have at least 1 section

2.  layouts/SocialPost-Social Post Layout.layout -- Error: Parent entity failed to deploy

3.  layouts/UserAlt-User Profile Layout.layout -- Error: Cannot use field:Name in a layout

4.  workflows/Question.workflow -- Error: Cannot create workflow directly; must create the CustomObject first

5.  workflows/Reply.workflow -- Error: Cannot create workflow directly; must create the CustomObject first

6.  workflows/SocialPost.workflow -- Error: Cannot create workflow directly; must create the CustomObject first

My approach has been to use sf:retrieve to get the metadata from the src\ folder and place it into a localCopy folder.  (The src\ files are the files checked into Git from the source Sandbox.)  Next, I have been using sf:deploy to use the files in the localCopy folder to refresh the target Sandbox.  When I run the sf:retrieve task, I am getting the six errors listed above.

I should point out that the items noted in the six errors (above) are not elements that we have made changes to.  My goal is to make the sf:retrieve and sf:deploy processes more generic, to simply push everything (that I can) from the source to the target Sandboxes.  Hopefully this is an obtainable goal.  :)

I can remove these six elements manually, but then I start getting errors with the referenes in the profiles.  If I leave out the profiles too, then my code deploys, but none of the permissions are getting set ... to things like Custom Fields in the Lead object (for example).  Ugh!

I am very new to Salesforce and to the Force Migration Tool ... so any help that can be provided would be very much appreciated.

Thank you for your time!
jv