• Rahul Kukreja 5
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi, good morning. 
I created a compact layout but I want to add it into a layout.
I edited the standard object "Opportunity" adding:
<compactLayouts>
<fullName>....</fullName>
<fields>...</fields>
</compactLayouts>
tags to add fields I made but I don't know where to add these elements in a page layout because some elements are distributed in differents tags like:
 
<layoutColumns>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>.......</field>
            </layoutItems>
</layoutColumns>

Thanks for your time,
Regards. 
 
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?

 
Hi, good morning. 
I created a compact layout but I want to add it into a layout.
I edited the standard object "Opportunity" adding:
<compactLayouts>
<fullName>....</fullName>
<fields>...</fields>
</compactLayouts>
tags to add fields I made but I don't know where to add these elements in a page layout because some elements are distributed in differents tags like:
 
<layoutColumns>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>.......</field>
            </layoutItems>
</layoutColumns>

Thanks for your time,
Regards. 
 
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?