0

嗨,我必须将现有的 eclipse 项目部署到我们的开发人员组织,当我部署它时它给了我一个错误

部署结果:

文件名:layouts/Account-Account Layout carousel.layout 全名:Account-Account Layout carousel 操作:NO ACTION 结果:FAILED 问题:CustomButtons 中只能使用按钮

这是Account-Account Layout carousel.layout的源代码

<?xml version="1.0" encoding="UTF-8"?>
<Layout xmlns="http://soap.sforce.com/2006/04/metadata">
    <customButtons>Edit_Carousel_Test</customButtons>
    <excludeButtons>DataDotComClean</excludeButtons>
    <excludeButtons>Submit</excludeButtons>
    <layoutSections>
        <customLabel>false</customLabel>
        <detailHeading>false</detailHeading>
        <editHeading>true</editHeading>
        <label>Account Information</label>
        <layoutColumns>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>OwnerId</field>
            </layoutItems>
            <layoutItems>
                <behavior>Required</behavior>
                <field>Name</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>ParentId</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>AccountNumber</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>Site</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>Type</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>Industry</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>AnnualRevenue</field>
            </layoutItems>
        </layoutColumns>
        <layoutColumns>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>Rating</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>Phone</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>Fax</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>Website</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>TickerSymbol</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>Ownership</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>NumberOfEmployees</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>Sic</field>
            </layoutItems>
        </layoutColumns>
        <style>TwoColumnsTopToBottom</style>
    </layoutSections>
    <layoutSections>
        <customLabel>false</customLabel>
        <detailHeading>false</detailHeading>
        <editHeading>true</editHeading>
        <label>Address Information</label>
        <layoutColumns>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>BillingAddress</field>
            </layoutItems>
        </layoutColumns>
        <layoutColumns>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>ShippingAddress</field>
            </layoutItems>
        </layoutColumns>
        <style>TwoColumnsTopToBottom</style>
    </layoutSections>
    <layoutSections>
        <customLabel>false</customLabel>
        <detailHeading>false</detailHeading>
        <editHeading>true</editHeading>
        <label>Additional Information</label>
        <layoutColumns>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>CustomerPriority__c</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>SLAExpirationDate__c</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>NumberofLocations__c</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>Active__c</field>
            </layoutItems>
        </layoutColumns>
        <layoutColumns>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>SLA__c</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>SLASerialNumber__c</field>
            </layoutItems>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>UpsellOpportunity__c</field>
            </layoutItems>
        </layoutColumns>
        <style>TwoColumnsLeftToRight</style>
    </layoutSections>
    <layoutSections>
        <customLabel>false</customLabel>
        <detailHeading>false</detailHeading>
        <editHeading>true</editHeading>
        <label>System Information</label>
        <layoutColumns>
            <layoutItems>
                <behavior>Readonly</behavior>
                <field>CreatedById</field>
            </layoutItems>
        </layoutColumns>
        <layoutColumns>
            <layoutItems>
                <behavior>Readonly</behavior>
                <field>LastModifiedById</field>
            </layoutItems>
        </layoutColumns>
        <style>TwoColumnsTopToBottom</style>
    </layoutSections>
    <layoutSections>
        <customLabel>false</customLabel>
        <detailHeading>false</detailHeading>
        <editHeading>true</editHeading>
        <label>Description Information</label>
        <layoutColumns>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>Description</field>
            </layoutItems>
        </layoutColumns>
        <style>OneColumn</style>
    </layoutSections>
    <layoutSections>
        <customLabel>true</customLabel>
        <detailHeading>false</detailHeading>
        <editHeading>false</editHeading>
        <label>Custom Links</label>
        <layoutColumns/>
        <layoutColumns/>
        <layoutColumns/>
        <style>CustomLinks</style>
    </layoutSections>
    <relatedLists>
        <fields>FULL_NAME</fields>
        <fields>CONTACT.TITLE</fields>
        <fields>CONTACT.EMAIL</fields>
        <fields>CONTACT.PHONE1</fields>
        <relatedList>RelatedContactList</relatedList>
    </relatedLists>
    <relatedLists>
        <fields>OPPORTUNITY.NAME</fields>
        <fields>OPPORTUNITY.STAGE_NAME</fields>
        <fields>OPPORTUNITY.AMOUNT</fields>
        <fields>OPPORTUNITY.CLOSE_DATE</fields>
        <relatedList>RelatedOpportunityList</relatedList>
    </relatedLists>
    <relatedLists>
        <fields>CASES.CASE_NUMBER</fields>
        <fields>NAME</fields>
        <fields>CASES.SUBJECT</fields>
        <fields>CASES.PRIORITY</fields>
        <fields>CASES.CREATED_DATE_DATE_ONLY</fields>
        <fields>CASES.STATUS</fields>
        <fields>OWNER_NAME</fields>
        <relatedList>RelatedCaseList</relatedList>
    </relatedLists>
    <relatedLists>
        <fields>TASK.SUBJECT</fields>
        <fields>TASK.WHO_NAME</fields>
        <fields>TASK.WHAT_NAME</fields>
        <fields>ACTIVITY.TASK</fields>
        <fields>TASK.DUE_DATE</fields>
        <fields>TASK.STATUS</fields>
        <fields>TASK.PRIORITY</fields>
        <fields>CORE.USERS.FULL_NAME</fields>
        <relatedList>RelatedActivityList</relatedList>
    </relatedLists>
    <relatedLists>
        <fields>TASK.SUBJECT</fields>
        <fields>TASK.WHO_NAME</fields>
        <fields>TASK.WHAT_NAME</fields>
        <fields>ACTIVITY.TASK</fields>
        <fields>TASK.DUE_DATE</fields>
        <fields>CORE.USERS.FULL_NAME</fields>
        <fields>TASK.LAST_UPDATE</fields>
        <relatedList>RelatedHistoryList</relatedList>
    </relatedLists>
    <relatedLists>
        <relatedList>RelatedNoteList</relatedList>
    </relatedLists>
    <relatedLists>
        <fields>ASSET.NAME</fields>
        <fields>ASSET.SERIAL_NUMBER</fields>
        <fields>ASSET.INSTALL_DATE</fields>
        <fields>ASSET.QUANTITY</fields>
        <fields>CONTACT.NAME</fields>
        <fields>ASSET.STATUS</fields>
        <fields>ASSET.IS_COMPETITOR_PRODUCT</fields>
        <relatedList>RelatedAssetList</relatedList>
    </relatedLists>
    <relatedLists>
        <fields>ACCOUNT.NAME</fields>
        <fields>OPPORTUNITY.NAME</fields>
        <fields>PARTNER.ROLE</fields>
        <relatedList>RelatedPartnerList</relatedList>
    </relatedLists>
    <relatedObjects>ParentId</relatedObjects>
    <showEmailCheckbox>false</showEmailCheckbox>
    <showHighlightsPanel>true</showHighlightsPanel>
    <showInteractionLogPanel>true</showInteractionLogPanel>
    <showRunAssignmentRulesCheckbox>false</showRunAssignmentRulesCheckbox>
    <showSubmitAndAttachButton>false</showSubmitAndAttachButton>
    <summaryLayout>
        <masterLabel>00hE0000000JOz5</masterLabel>
        <sizeX>4</sizeX>
        <sizeY>0</sizeY>
        <summaryLayoutStyle>Default</summaryLayoutStyle>
    </summaryLayout>
</Layout>

我是 Salesforce 的新手,了解基本的视觉力量和顶点,任何人都可以请帮助如何消除此错误/问题

4

1 回答 1

2

我怀疑有人创建了同名的自定义链接(链接是默认选择的选项)。转到您的目标环境,查看 Setup->Customize->Accounts->Buttons and Links 并验证,如有必要,将类型更改为“详细页面按钮”。如果根本没有这样的按钮/链接,则必须将其与布局一起部署或手动创建。

在 Eclipse IDE 中,转到 [您的项目]/objects/Account.object。如果最近添加了按钮,您可能需要点击“从服务器刷新”。

(如果您没有 Account.object 或刷新带回空文件 - 您必须修改您的package.xml. 如果您是新手,我不建议手动修改它,最好是右键单击,“添加/删除元数据组件”并使用复选框来包含标准对象。)

滚动到文件底部,会有一个带有一个或多个<weblink>....</weblink>标签的部分。验证是否存在与按钮名称同名的标签。与此类似的东西:

<webLinks>
    <fullName>Edit_Carousel_Test</fullName> <!-- name is important -->
    <availability>online</availability>
    <displayType>button</displayType>       <!-- of course so is this part -->
    <height>600</height>
    <linkType>url</linkType>
    <masterLabel>Edit Carousel Test</masterLabel>
    <openType>sidebar</openType>
    <protected>false</protected>
    <url>/apex/someVisualforcePage?id={!Account.Id}</url>
</webLinks>

最后 - 在构建部署包时,确保“Account.object”与您的“Account-Account Layout carousel.layout”一起部署。或者(因为可以在不部署的情况下添加按钮或链接)您可以决定通过在目标组织中手动创建具有相同名称和行为的按钮来满足这种依赖关系。

于 2012-12-01T15:08:05.037 回答