Cannot add Currency field to Entity after Importing

穿精又带淫゛_ 提交于 2019-12-11 01:14:37

问题


A custom entity was created in our DEV environment. It originally had a Currency field, but we decided to remove it and use a Float field for simplicity. After exporting the solution and importing it into QA for the first time, I can no longer add a Currency field to the entity in QA (and the "leftover" transactioncurrencyid column in DEV did not get migrated to QA).

The main problem is that I cannot remove the transactioncurrencyid column and now my Filtered views are different between DEV and QA which causes our SharePoint BCS process that relies on Entity Framework to fail.

Is there any way to completely remove a currency field without recreating the entity?

Plan B: Is there a way to restore a past copy of the entity (prior to removing the currency) from a backup and merge it into our presently broken version?

Plan C: any other ideas (convert EF to use Stored Procs, etc)?

Thanks!


回答1:


Export the entity from Dev into QA again. CRM will see that a column has been added, and will add it to the entity in QA.

Edit 1

So this is an unmanaged solution in QA? You should be able to just add the field to the entity in QA through the Customize Solution interface.




回答2:


The MSFT approved solution involved manually removing:

  1. the ExchangeRate column from the Base table (e.g. alter...drop column exchangerate)
  2. the rows referencing the attribute's GUID in the system tables: Attribute, localizedlabel, AttributeIds (e.g. delete from tbl where AttributeId = guid)
  3. altering the entity's View to remove the ExchangeRate column (not the Filtered)

Finding the GUID in Step 2 was done by opening the ExchangeRate field in CRM and pressing F11 to extract the AttributeID from the querystring.



来源:https://stackoverflow.com/questions/13128563/cannot-add-currency-field-to-entity-after-importing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!