Skip to main content
Vishnu Santhosh (Accenture) ha fatto una domanda in #Apex

Hi,

I am new to Salesforce Apex Development and currently working on Apex classes and Apex Test classes alone. To fetch data from org, what I am currently following is to use the SFDX:Retrieve source in manifest from org command in the Package.xml file. So,it retrieves all the data ( including Lighning pages, Aura components,etc). 

I saw there are several types mentioned in the Package.xml file. So my question is how can i fetch the Apex classes alone insteading of fetching all the data into the VSCode from Org ?

Does modifying the package.xml file will do? If so, can you please give a small explanation on that ?

Thank you :)

1 risposta
  1. 20 mag 2021, 07:59
    Hi Vishnu,

    Yes, you can modify the package.xml to retrieve the components you want.

    You can use a part in your package.xml like below to just retrieve the Apex Classes from your autheticated org:

    <types>

    <members>*</members>

    <name>ApexClass</name>

    </types>

    Reference for more examples:

    https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/manifest_samples.htm

    Hope above information helps, Please mark as Best Answer so that it can help others in the future.

    Thanks.
0/9000