【发布时间】:2013-12-18 13:30:08
【问题描述】:
我一直在努力部署我们的 force.com 应用程序代码,到目前为止,这些代码是在一个开发组织中开发的,我称之为 DevOrg。
我想要做的是将 DevOrg 对象、代码、页面等从 DevOrg 转移到我创建的新组织 (NewOrg) 中的沙箱中。 NewOrg 及其沙箱没有与应用程序相关的任何代码/对象。我使用迁移工具从 DevOrg 检索代码,并以各种方式制作 package.xml 以获取部署 NewOrg 沙箱的代码,但我不断收到大量错误,例如:
[sf:deploy] SomeClass: line 1014, column 95: Dependent class is invalid and needs recompilation:
[sf:deploy] SomceClass2: line 475, column 37: Dependent class is invalid and needs recompilation:
我进入 Eclipse IDE 并从 DevOrg 签出项目,导出项目并将其导入到指向 NewOrg 沙箱的项目。我想这可能会给我关于 package.xml 工作的提示,因为我可以在 Eclipse IDE 中的 DevOrg 项目中工作而不会出现任何问题/错误。
但是,当我在 IDE 中加载 NewOrg 沙盒项目时,却发现了同样的错误。所以我尝试为依赖类添加一个空间并将其保存到 NewOrg 沙箱,我收到了一个像这样的 sObject 错误:
Save error:
sObject type 'SomeClass__c' is not supported.
If you are attempting to use a custom object, be sure to append the '__c' after the entity name.
Please reference your WSDL or the describe call for the appropriate names.
认为这一定是因为对象尚未部署到 NewOrg 的沙箱,因此我尝试仅部署项目中的对象。那也失败了。这次出现这样的错误:
Save error:
Appointment_Type_Form__c.Form__c : referenceTo value of 'Form_Template__c'
does not resolve to a valid sObject type Appointment_Type_Form__c.object
Save error:
Form__c : Cannot set ControlledByParent on a CustomObject without a
MasterDetail relationship field Form__c.object
Save error:
Form__c.All : In field: columns - no CustomField named
Form__c.Form_Template__c found Form__c.object
Save error:
Form__c.Form_Template__c : referenceTo value of 'Form_Template__c'
does not resolve to a valid sObject type Form__c.object
Save error:
Form_Template__c : formoverride does not exist or is not
a valid override for action Edit. Form_Template__c.object
Save error:
GWAPI_Log__c : log_detail does not exist or is not
a valid override for action View. GWAPI_Log__c.object
Save error:
Idea.Ideas_Last_7_Days : Could not resolve list
view column: IDEA.IDEA_THEME Idea.object
Save error:
Message__c.Form_in_Question__c : referenceTo value of 'Form_Template__c'
does not resolve to a valid sObject type Message__c.object
Save error:
News__c : customarticle does not exist or is not a valid override
for action Edit. News__c.object
Save error:
Question__c : Cannot set ControlledByParent on a CustomObject without
a MasterDetail relationship field Question__c.object
Save error:
Question__c.All : In field: columns - no CustomField named
Question__c.Form_Template__c found Question__c.object
Save error:
Question__c.Form_Template__c : referenceTo value of 'Form_Template__c'
does not resolve to a valid sObject type Question__c.object
Save error:
Section__c : Cannot set ControlledByParent on a CustomObject without
a MasterDetail relationship field Section__c.object
Save error:
Section__c.Form_Template__c : referenceTo value of 'Form_Template__c'
does not resolve to a valid sObject type Section__c.object
Save error:
Security_Question_Answer__c.Question_Text__c : Field Is_Patient__c
does not exist. Check spelling. Security_Question_Answer__c.object
Save error:
sObject type 'Portal_Session__c' is not supported. If you are
attempting to use a custom object, be sure to append the '__c'
after the entity name. Please reference your WSDL or the describe call for the appropriate names.
因此,无论是在 IDE 中还是通过迁移工具 (MT) 进行的新部署,我都必须运气好。
我正在寻求有关在使用 IDE 或 MT 部署到全新组织时如何解决这些问题的建议。我认为,这些错误暗示了一些关于部署顺序的问题,但正如我从迁移工具指南、开发生命周期指南等中了解到的那样,依赖关系和顺序可以在部署时由平台确定。
有没有其他人遇到过类似的问题,发现解决方案严格在 package.xml 中?我很好奇,因为在一种情况下 package.xml 可以正常工作(部署到原始组织时),但在另一种情况下(新组织)似乎还不够。
【问题讨论】:
-
你有解决这个问题的办法吗?
标签: salesforce force.com