0

How I can retrieve "Community" metadata in Salesforce and will make to deploy for example to QA org. Need I create community/site in QA with equal site name how in DevOrg before deployment?.

2

Answers for your questions first.

How I can retrieve "Community" metadata in Salesforce and will make to deploy for example to QA org

depends on which deployment tool r u using?

--if you using change set just follow "community deployment by change set" below link

-- by sfdx you have to create package.xml as below code snippet then retrieve by using sfdx command

sfdx force:source:retrieve --manifest manifest\package.xml  -u source org

Need I create community/site in QA with equal site name how in DevOrg before deployment?.

---yes you have to create Community with same name in your target org before deployment.

My very rough notes below:

Community metadata deployment is not straightforward like others. some of the things you need to do in manually in target org like (publish & assign audiences). for community deployment you have to follow the order strictly other wise it 'll get errors keep on.

--if your using change set deployment, Network is main key metadata component for choose.community deployment by change set

-- if you want deploy by SFDX you have to follow below steps.

  1. first deployed the Community's Apex framework like(objects,fields,lightning components,apex classes/triggers)
  2. and then the Network/CustomSite/SiteDotCom metadata,
  3. and finally the Branding and Content Asset metadata

your package.xml should be like below.

    <?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>DSN</members>
        <name>CustomSite</name>
    </types>
    <types>
        <members>DSN</members>
        <name>Network</name>
    </types>
    <types>
        <members>DSN_C</members>
        <name>SiteDotCom</name>
    </types>
    <types>
        <members>A_Faculty</members>
        <members>B_Faculty</members>
        <members>C_Faculty</members>
        <name>Audience</name>
    </types>
    <types>
        <members>cbDSN_Community</members>
        <name>NetworkBranding</name>
    </types>    
    <version>46.0</version>
</Package>
  • Thanks for the open answer. Can I deploy metadata from DevOrg to DevOrg or I can only from sandbox to prodactionOrg? – Igor Jul 25 '19 at 16:15
  • yes you can deploy metadata again which deployment tool? by sfdx command 'sfdx force:mdapi:deploy -d mdapi-community/unpackaged -u target-org` – sdandamud1 Jul 25 '19 at 16:24
0

You can refer to Metadata developer guide for metadata names.

It would be CommunityTemplateDefinition.

You can refer to https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_communitytemplatedefinition.htm for all the sub-metadata for community.

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.