You need to sign in to do that
Don't have an account?
JohnnyV!
Force (Ant) Migration Tool & Issues with layouts
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
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
http://salesforce.stackexchange.com/questions/54458/feeditem-feed-item-layout-preventing-profile-deployment
Basically, the Ant Regex command was used to remove the un-migrateable (I really don't think that is a word) elements from the .profile records. Then, a second task was created to delete the un-migrateable (sorry again) files. Once I got the Regex working, my migration was working without any issues.
Here is some information from my build.xml that was used to do the regex and the delete:
The target/task to perform the sf:deploy has a depency on the delete_unmigrateable_files task, which has a dependency on remove_profile_references.
Hopefully, this information benefits someone else. :)
All Answers
http://salesforce.stackexchange.com/questions/54458/feeditem-feed-item-layout-preventing-profile-deployment
Basically, the Ant Regex command was used to remove the un-migrateable (I really don't think that is a word) elements from the .profile records. Then, a second task was created to delete the un-migrateable (sorry again) files. Once I got the Regex working, my migration was working without any issues.
Here is some information from my build.xml that was used to do the regex and the delete:
The target/task to perform the sf:deploy has a depency on the delete_unmigrateable_files task, which has a dependency on remove_profile_references.
Hopefully, this information benefits someone else. :)