• kusumu michael
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I am trying to deploy default Compact Layout assignment to different sandbox environments. The layout deploys fine, but in the target destination, the assignment isn't updated (stays with System Default).

I'm retrieving my code through my IDE (Mavensmate) and deploying thorugh ANT scripts.

In retrieving the related metadata (I don't want the whole object, only the relevant changes), I get the following:
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
    <compactLayouts>
        <fullName>Default</fullName>
        <fields>Name</fields>
        <fields>Field1__c</fields>
        <fields>Field2__c</fields>
        <fields>Field3__c</fields>
        <fields>Field4__c</fields>
        <label>Default</label>
    </compactLayouts>
</CustomObject>

I can try manually adding compactLayoutAssignment, but worry about this disappearing every time I retrieve/refresh my project from the org. Is there a way I can cleanly configure my project so this is retrieved, and I can deploy w/o updating the xml beforehand?