2012-12-01 24 views
0

嗨,我有一个现有的Eclipse项目部署到我们的开发者组织被用来当我部署它,它给了我一个错误只有按钮可能在CustomButtons

部署结果:

文件名:布局/账户-account布局carousel.layout 全名:帐号,帐号布局旋转木马 操作:无操作 结果:失败 问题:只有按钮可以在CustomButtons

这里使用的账户,账户布局旋转木马的源代码。布局

<?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知道基本的视觉力和顶点任何一个可以请帮助如何删除此错误/问题

回答

1

我怀疑有人已经创建了一个同名的自定义链接(链接是选项默认选择)。转到您的目标环境,查看设置 - >自定义 - >帐户 - >按钮和链接并验证,如果需要更改类型为“详细信息页面按钮”。如果没有这样的按钮/链接,则必须将其与布局一起部署或手动创建。

在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”与“帐户,帐户布局carousel.layout”一起部署。或者(因为无需部署就可以添加按钮或链接),您可以通过在目标组织中手动创建具有相同名称&行为的按钮来决定实现此依赖关系。