您好我必须将现有的eclipse项目部署到我们的开发人员组织,当我部署它时它给了我一个错误
文件名:布局/帐户 - 帐户布局carousel.layout 全名:帐户 - 帐户布局轮播 行动:不采取行动 结果:失败 问题:CustomButtons中只能使用按钮
这是帐户 - 帐户布局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的新手,知道visual force和apex的基本知识可以帮助我们如何删除此错误/问题
答案 0 :(得分:1)
我怀疑有人创建了一个具有相同名称的CUSTOM LINK(链接是默认选择的选项)。转到目标环境,查看“设置” - >“自定义” - >“帐户” - >“按钮和链接”并验证,如有必要,将类型更改为“详细信息页面按钮”。如果根本没有这样的按钮/链接,则必须将其与布局一起部署或手动创建。
在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”一起部署。或者(因为可以在不部署的情况下添加按钮或链接),您可以通过手动创建具有相同名称和按钮的按钮来决定实现此依赖关系。目标组织中的行为。