Tuesday, December 24, 2013

Delivering package for you HO HO HO

I got package for you!! Whenever I want to retrieve the code from Salesforce I seldom use Force IDE UI.I mean the one that we need to right click at Force.com -> Add/Remove Metadata Components. It slow and for unknown reason sometimes it hang my system. Other work around that I use is directly write the class,trigger or anything that I want in package file and then click Force.com ->Refresh from Server.
So here the sample of package file
<package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>MyApexClass</members>
        <name>ApexClass</name>
    </types>
    <types>
        <members>MyApexTrigger</members>
        <name>ApexTrigger</name>
    </types>
    <types>
        <members>MyCustomApplication</members>
        <name>CustomApplication</name>
    </types>
    <types>
        <members>MyCustomObject</members>
        <members>MyCustomSetting</members><!--Custom Setting inside CustomObject tag-->
        <name>CustomObject</name>
    </types>
        <types>
        <members>MyCustomObject.MyButtonName</members>
        <name>Weblink</name><!--To handle custom button -->
    </types>
    <types>
        <members>MyCustomTab</members> <!--Note -profile setting not able to be setup here-->
         <name>CustomTab</name>
    </types>
    <types>
        <members>MyStaticResource</members>
        <name>StaticResource</name>
    </types>
    <types>
        <members>Admin</members>
        <name>Profile</name>
    </types>
    <version>27.0</version>
</package>
        
Well the stuff that always give me headache previously is when I want to upload CustomSetting, it give me an error until I notice there no metadata for CustomSetting, but we can include it inside CustomObject type.


Have a nice holiday... HOHOHO...

No comments:

Post a Comment