我一直在努力部署我们的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工作正常(当部署到原始组织时),但在另一种情况下(新的组织)它似乎不够。
答案 0 :(得分:1)
处女沙箱的麻烦在于,通常无需多次迭代就无法部署它。
我使用了以下工作流程:
我建议您为最重要的对象一次一个地执行sObjects的部署。在部署之前,请检查标准对象的所有设置是否符合DevOrg的设置
您也可以尝试更改元数据的API版本。