ferdbiffle - Monday, February 2, 2009 2:52 PM:
I am trying to create a new ItemType by right-clicking on the "Part" ItemType, and selecting "Save As", When I do this I get the following error:
****************************************************************************************************
Unable to add because relationship could not be obtained.An internal error has occured.xml: GetRelId: InnovatorDatabaseException: String or binary data would be truncated. The statement has been terminated.at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at Aras.Server.Core.XML.SetErrorMessage(XmlDocument xmlDom, Int64 faultCode, String errorMessage, String dbMessage, String serverMessageXml) at Aras.Server.Core.ItemMethods.AddRelationshipEx(XmlDocument& inDom, XmlDocument& outDom, Boolean& permissionCheck, String& parentTypeName) at Aras.Server.Core.AddItem.AddItem_Implementation(XmlDocument& inDom, Hashtable& AdditionalItemInfo, XmlDocument& outDom, XmlDocument& relatedItemDom) at Aras.Server.Core.AddItem.AddItem(XmlDocument& inDom, Hashtable& AdditionalItemInfo, XmlDocument& outDom) at Aras.Server.Core.ApplyItem.ApplyItem_Implementaion(XmlDocument& inDom_, Hashtable& AdditionalItemInfo, XmlDocument& outDom) at Aras.Server.Core.ApplyItem.ApplyItem(XmlDocument& inDom, XmlDocument& outDom) at Aras.Server.Core.ExportImport.CopyItem(XmlDocument& inDom, XmlDocument& outDom) at Aras.Server.Core.ApplyItem.ApplyItem_Implementaion(XmlDocument& inDom_, Hashtable& AdditionalItemInfo, XmlDocument& outDom) at Aras.Server.Core.ApplyItem.ApplyItem(XmlDocument& inDom, XmlDocument& outDom) at Aras.Server.Core.Utilities.ApplySoapAction(String& soap_action, XmlDocument& inDom, XmlDocument& outDom, Boolean sec_chk, TextWriter writer) at Aras.Server.Core.Startup.soap_action_dispatch() at Aras.Server.Core.Startup.soap_action_dispatch_errorhandler() at Aras.Server.Core.Startup.innovatorserver_main_dispatch() at Aras.Server.Core.Startup.innovatorserver_main() at ASP.innovatorserver_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.innovatorserver_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error) at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr) at System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
****************************************************************************************************
Is there a better way to accomplish this? I successfully created a new ItemType based on the Document, so I believe this is the proper way.
Bill - Tuesday, February 3, 2009 6:35 PM:
I do not recommend using the "Save As..." functionality on the ItemType Items. This is more than just duplicating data, like with other Items, but duplicating structure at the same time. Without being familiar with the structure, you could end up pointing to a method or user that is not correct for your implementation.
I honestly think it would be faster and safer to rebuild the ItemType, using Part as a guide rather than trying to find the little things like which propety value will be truncated as a result of the copy. Especially for new admins.
-Bill
ferdbiffle - Wednesday, February 4, 2009 4:06 PM:
Thanks Bill,
I ended up extending the "Part" ItemType, since I'm just doing a POC at this point.