tag:blogger.com,1999:blog-2621903657834933281.post7823321042242506348..comments2023-07-20T17:56:51.463+05:30Comments on Microsoft Dynamics: Cannot Delete/Publish changes in a Custom/System Entityvishal swamihttp://www.blogger.com/profile/12498695901164843294noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-2621903657834933281.post-68503970867792935442016-08-18T02:08:21.413+05:302016-08-18T02:08:21.413+05:30I know this is an old issue, but ran into a simila...I know this is an old issue, but ran into a similar problem. Here is a query to help discover customize production forms who have attributes that have since been deleted:<br /><br />SELECT DISTINCT <br /> Form.value( '(/forms/entity/@name)[1]', 'nvarchar(max)' ) AS Entity, Ui.DataField.value( '.', 'nvarchar(max)' ) AS DataField<br />FROM<br />(<br /> SELECT *, CONVERT(xml, [FormXml]) AS Form<br /> FROM [dbo].[OrganizationUIBase]<br /> WHERE [InProduction]= 1 AND [CustomizationLevel] > 0<br />) AS Data<br />CROSS APPLY<br />Form.nodes( '//@datafieldname' ) AS UI(DataField)<br />EXCEPT<br />SELECT entity.name, Attribute.Name<br />FROM [MetadataSchema].[Attribute]<br /> INNER JOIN<br /> [MetadataSchema].[Entity]<br /> ON Attribute.EntityId = Entity.EntityId;<br /><br /><br />Recreating the attribute allowed for publishing and export of the form. We removed the reference on the form and then removed recreated attribute. All was happy.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2621903657834933281.post-75614329287879041352009-08-24T23:51:50.037+05:302009-08-24T23:51:50.037+05:30Awesome thanks very much.
For me I found that I p...Awesome thanks very much.<br /><br />For me I found that I previously had a custom lookup against case called feees_originatorid (display name: Originator) and that we had replaced that deleted relationship with another custom relationship called feees_contactid (display name: Originator). [Probably without publishing in between, I'd guess?!]<br /><br />The form wasn't loading correctly in design view and wouldn't publish, export or import.<br /><br />I used the following command to sort it via SQL (although unsupported):<br /><br />View form items for my entity:<br />SELECT * FROM OrganizationBaseUI WHERE formxml like '%name="incident"%'<br /><br />Grabbed the formidunique value (not the formid) and ran:<br />UPDATE OrganizationBaseUI SET formxml = REPLACE(formxml,'feees_originatorid','feees_contactid') WHERE FormIdUnique = '(enter the formidunique GUID from your investigations here)'<br /><br />In my case it was the form which was set to InProduction = 1 which needed updating.<br /><br />Now I can export, Import, Publish with no issues.<br /><br />I hope this helps someone else!Critchhttps://www.blogger.com/profile/17523285068200333725noreply@blogger.comtag:blogger.com,1999:blog-2621903657834933281.post-13944662956565146292009-08-03T18:10:28.033+05:302009-08-03T18:10:28.033+05:30THANKS SO MUCH.
Somehow the email entity ended up...THANKS SO MUCH.<br /><br />Somehow the email entity ended up in this same state where I could not delete or publish any changes to it. <br /><br />Editing the form XML did the trick. There was a tab section defined but had nothing in it. Removing this did the trick.<br /><br />A side note: You can easily find all your custom changes by searching for <br /><br />UserDefined="1"<br /><br />in the xml - this will make it easier.Unknownhttps://www.blogger.com/profile/04829815875628716444noreply@blogger.com