amguerrero / sfdc_ant_tasks

Salesforce.com ANT Deployment Helper Tasks
14 stars 5 forks source link

Handling Local Extensions of Managed Objects #4

Open TedHusted opened 7 years ago

TedHusted commented 7 years ago

NUEntityc (for example) is a managed object that we extend in our implementation. In our metadata, we track only the local extensions provided in our implementation, such as new custom fields, validation rules, and so forth. We do not declare items already defined by the base package, such as object

If deltaDeployment handled local extensions to managed packages as the API expects, then we could use the task with implementations that extend managed packages.

Here is an example of adding a local custom field to a managed object.

<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
    <enableEnhancedLookup>true</enableEnhancedLookup>
    <fields>
        <fullName>CommunityHubUrl__c</fullName>
        <deprecated>false</deprecated>
        <description>The field contains the URL for this entity&apos;s Community Hub site. The URL listed here may be used elsewhere in Nimble AMS to calculate other URL based fields ... such as the Event Detail URL for Community Hub.</description>
        <externalId>false</externalId>
        <inlineHelpText>Enter the URL for this entity&apos;s Community Hub site. The URL listed here may be used elsewhere in Nimble AMS to calculate other URL based fields.</inlineHelpText>
        <label>Community Hub Url</label>
        <length>255</length>
        <required>false</required>
        <trackHistory>false</trackHistory>
        <trackTrending>false</trackTrending>
        <type>Text</type>
        <unique>false</unique>
    </fields>
</CustomObject>

Manifest: ...

    <members>NU__Entity__c.CommunityHubUrl__c</members>
    <name>CustomField</name>
</types>

....

amguerrero commented 7 years ago

Hi Ted,

unfortunately deltaDeployment task doesn't look inside the files that changed or what changed, it just finds out which files changed and builds the package with them.

It would be a nice feature though, as it would create a leaner and more specific package, and I will implement it in the future.